1, source code creation Write the grammar defined by java in the source code
3, execution After compiling, execute bytecode in software called an interpreter.
Enter alphanumeric characters basically in half-width characters Don't mistake similar letters
I don't know if it's closed in parentheses, so be aware of opening and closing immediately.
Try to write source code that is easy for anyone to read
Indent to make it easier to see the multiple structure of blocks
public class Main {
public static void main(String[] args) {
System.out.println("hello, world!");
}
}
You can add commentary to the source code Ignored at runtime when the program is compiled
/*Comment body (multiple lines allowed)*/
//Comment body (until the end of the line)
Variables are like boxes that you prepare inside your computer to store data.
public class Main {
public static void main(String[] args) {
int age;
age = 30;
System.out.println(age);
}
}
public class Main {
public static void main(String[] args) {
final double TAX = 1.08;
int fax = 5;
System.out.println(fax * TAX +"Ten thousand yen");
}
}
Recommended Posts