java tutorial - Java - Method Character.isUpperCase() - java programming - learn java - java basics - java for beginners



Java characters isuppercase

Learn Java - Java tutorial - Java characters isuppercase - Java examples - Java programs

Description

Java - Method Character.isUpperCase() — in Java determines whether the specified char value is in uppercase (capitalized).

Syntax

boolean isWhitespace(char ch)
click below button to copy the code. By - java tutorial - team

Options

Detailed information about the parameters:

  • ch is a primitive character type (char).

Return value

  • In Java, Character.isUpperCase () returns true if the transmitted character is uppercase.

Sample Code

public class Test {

   public static void main (String args []) {
      System.out.println ("Value \"P\"in uppercase? Answer:" + Character.isUpperCase ('P'));
      System.out.println ("Value \"R\"in uppercase? Answer:" + Character.isUpperCase ('R'));
      System.out.println ("Value\"o\"in uppercase? Answer:" + Character.isUpperCase ('o'));
      System.out.println ("Value \"1\"in uppercase? Answer:" + Character.isUpperCase ('1'));
      System.out.println ("Value \"&\"in uppercase? Answer:" + Character.isUpperCase ('&'));
   }
}
click below button to copy the code. By - java tutorial - team

Output


Value \"P\"in uppercase? Answer: true
Value \"R\"in uppercase? Answer: true
Value \"o\"in uppercase? Answer: Answer: false
Value \"1\"in uppercase? Answer: false
Value \"&\"in uppercase? Answer: false

Related Searches to Java - Method Character.isUpperCase()