Java static [Personal summary]

【Java static】

I didn't understand Java static very well, so I researched and summarized it. I would be grateful if you could point out.

I will add it as needed and use it as a memorandum.

static method

This method does not change its processing even if it is called from any instance of a certain class. Static methods are not affected by instantiation.

It can be called without an instance in the form of class name.method name. Java's main method always needs static (because it's the first).

Non-static method

Variables that do not use static cannot be used unless the class is instantiated. → Non-static variable

variable

・ Class variables Global variables in the class → Shared by all instances (created from classes).

-Instance variables Instance-specific local variables → Used only in one instance.

Recommended Posts

Java static [Personal summary]
Personal summary about Java
Java static
Java knowledge summary
Java Generics Summary
Java static story
Java related summary
Java 8 documentation summary
Java 11 document summary
[Java] Personal summary of conditional statements (basic)
Java 12 new feature summary
effective java 3rd summary
Java 13 new feature summary
[Personal memo] try-catch summary
Thread safe summary ~ Java ~
Java Primitive Specialization Summary
Java development link summary
docker command personal summary
Java 10 new feature summary
java regular expression summary
Java 14 new feature summary
Summary of Java support 2018
Java design pattern summary
Java reserved word summary
Java8 Stream Rough Summary
What is Java Assertion? Summary.
Progate Java (Beginner) Review & Summary
Personal comment criteria [Java edition]
[Java] Stack area and static area
[Java] JavaConfig with Static InnerClass
[Java] Summary of regular expressions
[Java] Summary of operators (operator)
Java8 stream, lambda expression summary
Object-oriented summary by beginners (Java)
[java] Reasons to use static
Summary of Java language basics
Java tips --Spring execution Summary
[Java] Summary of for statements
Summary of Java Math class
[Java] Classes, constructors, static members
Benefits of Java static method
[Java11] Stream Usage Summary -Basics-
[Java] Summary of control syntax
Summary of java error processing
[Java] Summary of design patterns
[Java] Summary of mathematical operations
Java HashMap, entrySet [Personal memo]
About Java static and non-static methods
Consideration on Java Persistence Framework 2017 (Summary) -1
[For beginners] Summary of java constructor
Personal memo: Metaprogramming with Java reflection
Java release date and EOL summary
Summary of [Java silver study] package
Summary
static
AtCoder 400 points algorithm summary (Java edition)
Java
Java "pass by reference" problem summary
Java EE 8 (Jakarta EE 8) New feature summary
Java
Summary of object-oriented programming using Java