import java.lang.*;
import java.io.*;
public class
public static void main(String[] args) throws IOException{
System.out.println(
BufferedReader bf =
new BufferedReader(new InputStreamReader(System.in));
System.out.println(
String str1 = bf.readLine();
System.out.println(
String str2 = bf.readLine();
if (str1.equals(str2)){
System.out.println(
}
else{
System.out.println(
}
}
}
Out put of program
import java.io.*;
public class
CompareString
{public static void main(String[] args) throws IOException{
System.out.println(
"comparison of string"
!);BufferedReader bf =
new BufferedReader(new InputStreamReader(System.in));
System.out.println(
"Enter first string:"
);String str1 = bf.readLine();
System.out.println(
"Enter second string:"
);String str2 = bf.readLine();
if (str1.equals(str2)){
System.out.println(
"string is equals"
);}
else{
System.out.println(
"string is not equals"
);}
}
}
Out put of program
No comments:
Post a Comment