[Java] Basic structure

Basic structure of Java

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? スクリーンショット 2020-02-24 12.24.40.png

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:

matryoshkas.png

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

[Java] Basic structure
Java basic grammar
Java basic grammar
Java basic knowledge 1
[Java] [Basic] Glossary
Java basic grammar
Java basic grammar
Java exercises [Basic]
Basic structure of Java source code
java basic knowledge memo
[Java] Data type ①-Basic type
Java learning memo (basic)
Java programming (class structure)
Java tree structure library
[Java] Basic method notes
Java basic data types
Basic Java OOps concepts
Java basic learning content 7 (exception)
Java basic syntax + α trap
[Java] Basic statement for beginners
Java basic learning content 5 (modifier)
Implement Basic authentication in Java
Java
Java
Java Basic Learning Content 8 (Java API)
[Beginner] Java basic "array" description
List data structure [Java / Scala]
Java basic learning content 4 (repetition)
[Java] Basic terms in programming
[Java] Basic types and instruction notes
Basic data types and reference types (Java)
Java basic learning content 9 (lambda expression)
Basic usage of java Optional Part 1
Java basic learning content 2 (array / ArrayList)
Reading and writing Java basic files
Basic processing flow of java Stream
Java basic data types and reference types
[Basic knowledge of Java] Scope of variables
[Java] Exception types and basic processing
Java learning (0)
Studying Java ―― 3
Profiling with Java Visual VM ~ Basic usage ~
Java protected
[Java] Annotation
[Java] Module
Java array
Studying Java ―― 9
Java scratch scratch
Java tips, tips
Java methods
Java method
java (constructor)
Java array
[Java] ArrayDeque
java (override)
Java Day 2018
Java string
java (array)
Java static
Java serialization
java beginner 4