Exp 1.4 Java
Exp 1.4 Java
Experiment: 1.4
Aim of the practical: Given a string A, print Yes if it is a palindrome, print No
otherwise.
Program code:
import java.io.*;
import java.util.*;
if (reversed.equals(A)) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
}
Output:
Learning Outcomes: