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
advertising
java/lang/object/equals.txt · Last modified: 2013/04/10 10:12 by 94.223.12.247

Impressum Datenschutz