Computer Science, asked by gurpreetbrar0810, 9 months ago

write a function int check(char ch). which returns 1 if ch is an uppercase letter otherwise returns -1.

Answers

Answered by UTKARSH3837
0

Answer:

Explanation:

class ch

{

int check(char ch)

{

DataInputStream in=new DataInputStream(System.in);

char ch=(char)in.read();

if(ch>='A' && ch<='Z')

return(1);

return(-1);

}

public static void main(String args[] )

{

ch obj=new ch();

System.out.println(obj.check);

}

}

Similar questions