Answer to Question #301516 in Java | JSP | JSF for Billy Jean

Question #301516

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-23T06:24:32-0500




class App {


	public static void main(String[] args) {
		String name = "Ryan Christian Nono";
		int years = 25;
		String reading = "books";
		String watching = "movies";
		String favoriteColor = "Black";
		String skeyColor = "white";
		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 %s.\n", favoriteColor,skeyColor);
		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