Assignment, variables and constants
public class helloworld {
final static String outText = "correct way";
public static void main(String[] args) {
String outputString = "Hello World";
System.out.println(outputString);
System.out.println(outText);
}
}
- The basics of most programming languages include variables, in this
case outputString.
- There are constants, in this case "correct way" and "Hello World".
- There are named constants (which is the correct way to do it except 0 and
1), like outText.
- You can assign to variables. outputString = "Hello World".