public class Main
{
public static boolean IsAlpha(char simbolo)
{
if ((simbolo >= 'a') && (simbolo <= 'z'))
{
return true;
}
if ((simbolo >= 'A') && (simbolo <= 'Z'))
{
return true;
}
return false;
}
public static boolean IsAlpha2(char simbolo)
{
simbolo = Character.toLowerCase(simbolo);
if ((simbolo >= 'a') && (simbolo <= 'z'))
{
return true;
}
return false;
}
public static boolean IsAlpha3(char simbolo)
{
simbolo = String.valueOf(simbolo).toLowerCase().charAt(0);
if ((simbolo >= 'a') && (simbolo <= 'z'))
{
return true;
}
return false;
}
public static boolean IsAlpha4(char simbolo)
{
String validas = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqwrstuvwxyz";
if (validas.contains(simbolo))
{
return true;
}
return false;
}
public static void main(String[] args)
{
System.out.println(IsAlpha('w'));
System.out.println(IsAlpha('2'));
}
}