HOME      BLOG       FORUMS      CONTACT       ABOUT

Convert a primitive char value to Character object

The Character constructor helps us to create an object representation of a primitive char value.

public class CharWrapper {
	public static void main(String[] args) {
		char c = 'A';
		Character objChar = new Character(c);
		System.out.println(objChar);
	}
}

Share

Tags: , , , , ,


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply