Example.java
public class Main {
public static void main(String[] args) {
System.out.println("hello, world!");
}
}
1st line public class Main {
From
Up to} on the 5th line Is called ** class block **.
2nd line public static void main (String [] args) {
From
Up to} on the 4th line Is called ** method block **
On the third line, write a statement asking what you want your computer to do. Does it look like the image below?
A box of method blocks and a box of statements are contained in a box called a class block. Inside the method block box is a statement box. It's a nesting ceremony like a so-called Russian doll: smile:
For the time being, I would like to output the part of the statement on the third line. Class blocks and method blocks will eventually be output as my study progresses: sweat_smile:
Recommended Posts