└── palindromeString /palindromeString: -------------------------------------------------------------------------------- 1 | class main{ 2 | public static void main(String[] args) { 3 | String str="madam"; 4 | System.out.println("The string is "+str); 5 | int count=0; 6 | for(char i:str.toCharArray()) 7 | { 8 | count++; 9 | } 10 | System.out.println("The String Length is "+count); 11 | int lower=0; 12 | for(int i=0;i='a'&&ch<='z'||ch>='A'&&ch<='Z'||ch>='0'&&ch<='9') 16 | { 17 | lower++; 18 | } 19 | 20 | System.out.print((char)(str.charAt(i)-32)); 21 | } 22 | System.out.println(); 23 | if(lower==count) 24 | { 25 | System.out.println("Its a lower case string input"); 26 | } 27 | else 28 | { 29 | System.out.println("Its not a lower case string input"); 30 | } 31 | String s=""; 32 | for(int i=count-1;i>=0;i--) 33 | { 34 | s=s+str.charAt(i); 35 | } 36 | System.out.println("The reverse of String is "+s); 37 | if(str.contains(s)) 38 | { 39 | System.out.println("Both the Strings are equal"); 40 | } 41 | else 42 | { 43 | System.out.println("Both the Strings not are equal"); 44 | } 45 | } 46 | } 47 | --------------------------------------------------------------------------------