Computer Science, asked by fahi333, 1 month ago

(take 2 input strings)
java program for reversal of first string if taken 2 strings are equal and if strings are not equal print strings not equal (case sensitive comparison)​

Answers

Answered by Anonymous
0

Answer:

use equals() command

Explanation:

class Teststringcomparison1{

public static void main(String args[]){

String s1="chin";

String s2="cHin";

String s3=new String("chin");

String s4="rekha";

System.out.println(s1.equals(s2));

System.out.println(s1.equals(s3));

System.out.println(s1.equals(s4));

}

}

Similar questions