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.
public class Main {
public static void main(String[] args) {
String name = "Ryan Christian Nono";
int age = 25;
String hobby = "reading books and watching movies";
String color = "Black";
String subject = "Programming 2";
System.out.println("Hi my name is " + name + ".");
System.out.println("I am " + age + " Years Old.");
System.out.println("I love " + hobby + ".");
System.out.println("My favorite color is `" + color + "` because the sky is white.");
System.out.println("I love " + subject + " because of my Instructor.");
}
}
Comments
Leave a comment