assertTrue(boolean) Determine if the argument is true. Object.equals
public boolean equals(Object object){
return true;
}
Reference article https://engineer-club.jp/java-equals
Add (type name) immediately before the target variable.
long l = 1026;
int i = (int) l;
Reference article https://java-code.jp/66
Class without inheritance
public class School{
String name;
int id;
attend(){}
test(){}
}
When inherited,
public class Student{
String name;
int id;
attend(){}
}
public class School extends Student{
test(){}
}
The original class (student) is called the parent class, the superclass, and the inherited class (school) is called the subclass. ·override → Overwrite the superclass method with a subclass.
Reference article https://techacademy.jp/magazine/9246
public
Can be accessed from anywhere. Only one in a file. The file name and class name must be the same.
protected
It can be accessed from inside the subclass that inherits the class.
private
Only accessible from inside the class.
Get an instance of class information with getClass (). Instance variable
. (Unknown)