Example for isUpperCase() method of character class

Example for isUpperCase() method of character class


Posted in : Core Java Posted on : October 1, 2010 at 3:03 PM Comments : [ 0 ]

In this tutorial, We will introduce you about the isUpperCase() method of character class.

Example for isUpperCase() method of character class

In this tutorial, We will introduce you about the isUpperCase() method of character class. This method specifies whether the given character is Upper Case or not. This method returns true when character is in upper case and false when character is not in upper case.

Example:CharacterIsUpperCase.java

package com.devmanuals;

public class CharacterIsUpperCase {

       
public static void main(String[] args) {
               
System.out.print("Is character G is UpperCase= ");
               
System.out.println(Character.isUpperCase('G'));
               
System.out.print("Is character g is UpperCase= ");
               
System.out.println(Character.isUpperCase('g'));
               
System.out.print("Is character H is UpperCase= ");
               
System.out.println(Character.isUpperCase('H'));
       
}

}

Output:

Is character  G  is UpperCase= true

Is character  g  is UpperCase= false

Is character  H  is UpperCase= true

Download This Example.

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics