9496 Lynk's site for housing knowledge and information for the team.
String
in java is like a variable that stores text.String
named text
and store “Answer: “
inside of it.//Anything typed after a "//" is comment, the complier ignores comments
//Comments are used to provide more information about what a program is doing.
public class JavaIntro { //This creates the "class", for now think of each class like a document or file
public static void main(String args[]) { //This line lets Java know what to run when you click execute below
double x = 10;
double y = 20;
double answer = x / y;
String text = "Answer: ";
System.out.println(text + answer);
} //End of main
} //End of JavaIntro