User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







java:lang:object:equals

equals

Compares object and indecates if they equal

equals(Object); 
 
return value: boolean true/false

equals Example in java

String a = "42";
String b = "144";
 
if ( a.equals(b) ) { 
 
    System.out.println(b+" is the answer");
} else {
 
    System.out.println(b+" is probably not the answer");
}

output

   144 is probably not the answer

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
java/lang/object/equals.txt · Last modified: 2024/02/16 01:12 (external edit)

Impressum Datenschutz