| 4 | package String; |
| 5 | import java.util.Scanner; |
| 6 | public class CheckPalindrome { |
| 7 | |
| 8 | public static boolean check(String str) { |
| 9 | String reversed = ""; |
| 10 | |
| 11 | boolean ispal = false; |
| 12 | for (int i = 0; i < str.length(); i++) { |
| 13 | reversed = str.charAt(i) + reversed; |
| 14 | } |
| 15 | if (reversed.equals(str)) { |
| 16 | ispal = true; |
| 17 | } |
| 18 | return ispal; |
| 19 | } |
| 20 | public static void main(String[] args) { |
| 21 | Scanner sc = new Scanner(System.in); |
| 22 | String str = sc.nextLine(); |
| 23 | boolean check = check(str); |
| 24 | System.out.println(check); |
| 25 | } |
| 26 | |
| 27 | } |
nothing calls this directly
no outgoing calls
no test coverage detected