IF - ELSE - IF Condition In JAVA.
JAVA CODING :-
public class elseif
{
static void check(char input)
{
if(input>=65 && input<=90)
{
System.out.println("\n"+input+" is Uppercase character.");
}
else if(input>=97 && input<=127)
{
System.out.println("\n"+input+" is lowercase character.");
}
else if(input>=48 && input<=57)
{
System.out.println("\n"+input+" is a digit.");
}
else
{
System.out.println("\n"+input+" is a symbol.");
}
}
public static void main(String[] args)
{
//For static no need to create Object
check('g');
check('A');
check('$');
check('8');
check('&');
check('4');
check('J');
check('+');
}
}
0 Comments