Answer to Question #301233 in Java | JSP | JSF for Michael Parenas

Question #301233

Create a program that will only require the programmer to change the variable values in order to create a dynamic sentence using the sentence sample Output.



BOLD words indicates a variable.


Sample Output:


-----------------------------------------------------------------------------------



Hi my name is Ryan Christian Nono.


I am 25 Years Old.


I love reading books and watching movies.


My favorite color is `Black` because the sky is white.



I love Programming 2 because of my Instructor.

1
Expert's answer
2022-02-22T12:13:16-0500


class App {


	public static void main(String[] args) {
		String name = "Ryan Christian Nono";
		int years = 25;
		String reading = "books";
		String watching = "movies";
		String color = "Black";
		String programming = "Programming 2";
		System.out.printf("Hi my name is %s.\n", name);
		System.out.printf("I am %d Years Old.\n", years);
		System.out.printf("I love reading %s and watching %s.\n", reading, watching);
		System.out.printf("My favorite color is '%s' because the sky is white.\n", color);
		System.out.printf("I love %s because of my Instructor.\n", programming);
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS