In this program we are going to compare 2
Strings using if else
//Program to compare 2 strings using if
else
public class IfElse4{
public static void main(String args[]){
String a="Wassup";
String b="Wassup";
if(a.equals(b)){
System.out.println("The Strings are same ");
}
else{
System.out.println("The Strings are not same ");
}
}
}
public class IfElse4{
public static void main(String args[]){
String a="Wassup";
String b="Wassup";
if(a.equals(b)){
System.out.println("The Strings are same ");
}
else{
System.out.println("The Strings are not same ");
}
}
}
No comments:
Post a Comment