Logo 
Search:

Java Articles

Submit Article
Home » Articles » Java » FundamentalRSS Feeds

Character Wrapper Class

Posted By: Allan Bailey     Category: Java     Views: 10182

This article explains about Character wrapper class in java.

Character wrapper class is used to wrap primitive data type char value in an object. 

Examples of Character Wrapper Class

Example 1 : Convert char data type to Character object
public class charToCharacter
{
  public static void main(String[] args) 
  {
    char c = 'a';
  
    Character cObj = new Character(c);
    System.out.println(cObj);
  }
}

Output 
a

  
Share: 

 
 

Didn't find what you were looking for? Find more on Character Wrapper Class Or get search suggestion and latest updates.

Allan Bailey
Allan Bailey author of Character Wrapper Class is from Houston, United States.
 
View All Articles

 

Other Interesting Articles in Java:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!