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