0
can someone pls explain output od this code
public class vjezbe { public static void main(String [] args){ String a="sad"; String b="SAD".toLowerCase(); if(a==b){ System.out.println(true); }else{ System.out.println(false); } System.out.println(b); } }
3 ответов
+ 3
Use .equals() method
+ 2
public class vjezbe {
public static void main(String [] args){
String a="sad";
String b="SAD".toLowerCase();
if(a.equals(b)){
System.out.println(true);
}else{
System.out.println(false);
}
System.out.println(b);
}
}
+ 2
aaa so I cant use == here?
thanks for clue i google more about this