Because I make a small mistake when writing code I will make an article as a memorandum as a commandment.
The following mistake in checking the if statement of a String type variable
<✕>
if(name == "minato"){
···processing
}
<〇>
if(name.equals("minato")){
···processing
}
Recommended Posts