I was a little confused by the method call in FQCN and the instance (attribute, operation) from the class, so I organized it first.
FQCN: package.Class.method()
Method call (Class) on the instance. Let n be the variable of the instance
n.method()
// FQCN: Fully Qualified Class Name
Instances are created from fields and operations (methods, actions) defined in the class.
A method that is automatically executed immediately after the class is new.
public class Hero { int hp; Hero() { this.hp = 100; // Initialize the hp field with 100. } }
this (argument);
.Class(String names) { this.name = names; this.hp = 100 Class { this("Bob"); }}
If you add static to the field, it becomes a static field. Accessing a static field from an instance variable also affects the original static field.
Recommended Posts