Code: Select all
import java.io.*;
import java.util.*;
public class palindrome
{
public static void main(String[] args)
{
String tstst = "MOM";
String temp = "";
for(int i = 0; i < tstst.length(); i++)
{
if((tstst.charAt(i)>= 'A') && (tstst.charAt(i)<= 'Z'))
{
temp = temp + tstst.charAt(i);
} //end if statement
} //enf for loop
} //end main
} //end palindrome