Organized memo in the head (Java --instance edition)

My Java environment

static

Method return value

Variadic argument


public static void main(String... args) {
    //processing
}

public void method(String value, String... args) {  } // OK
public void method(String... args, String value) {  } // NG

Method overload

constructor

Constructor and initializer {}

The initializer {} is described directly under the class block. Executed before the constructor is executed.


public class Test {
    {
        //Initialization process
    }
}

There is also a static initializer. Executed when the class is loaded.


public class Test {
    static {
        //Initialization process
    }
}

Modifier

Method arguments

Recommended Posts

Organized memo in the head (Java --instance edition)
Organized memo in the head (Java --Array)
Organized memo in the head (Java --Control syntax)
Organized memo in the head (Java --Data type)
Organized notes in the head (Java-Exceptions)
Access the network interface in Java
Guess the character code in Java
Specify the java location in eclipse.ini
Unzip the zip file in Java
Measuring instance memory usage in Java
Parsing the COTOHA API in Java
Call the super method in Java
Get the result of POST in Java
Java reference to understand in the figure
Try using the Stream API in Java
Memo: [Java] Check the contents of the directory
I tried the new era in Java
Memo: [Java] If a file is in the monitored directory, process it.
[Java] Use cryptography in the standard library
Java memo
Try calling the CORBA service in Java 11+
What is the main method in Java?
How to get the date in java
The story of writing Java in Emacs
Console input in Java (understanding the mechanism)
Display message dialog in java (personal memo)
Regarding the transient modifier and serialization in Java
[Java] Handling of JavaBeans in the method chain
About the confusion seen in startup Java servers
The story of making ordinary Othello in Java
About the idea of anonymous classes in Java
A story about the JDK in the Java 11 era
Parallel and parallel processing in various languages (Java edition)
Measure the size of a folder in Java
Feel the passage of time even in Java
[Java] Read the file in src / main / resources
Display "Hello World" in the browser using Java
[Java] Judgment by entering characters in the terminal
Display "Hello World" in the browser using Java
Try using the COTOHA API parsing in Java
[Java] Memo on how to write the source
[Java] Something is displayed as "-0.0" in the output
Import files of the same hierarchy in Java
Partization in Java
java, maven memo
Changes in Java 11
[Java] Exception instance
Rock-paper-scissors in Java
Java SE 7 memo
java anything memo 2
Pi in Java
Java specification memo
FizzBuzz in Java
Java pattern memo
Get the URL of the HTTP redirect destination in Java
[Java] How to omit the private constructor in Lombok
Read the packet capture obtained by tcpdump in Java
Which is better, Kotlin or Java in the future?
[Personal memo] Make a simple deep copy in Java
Organized how to interact with the JDK in stages
A note for Initializing Fields in the Java tutorial