Character Datatype in Java

Get Into Code provides you with free C++ and Java Course in Hindi/Urdu and also provides you the opportunity to practice your skills to be perfect. In the previous video we have discussed about the Floating Point Datatype in Java.  In this video we are going to discuss about Character Datatype in Java.
Character Datatype
As the Name of Character Datatype itself shows that it can store character in it. Every Single Alphabet consider as a Character. It also includes Special Characters such as $, &, £ and @ etc. It can store a Single Character.
Syntax
char variable_name;

Watch The Below Video to Understand Character Datatype in Java


The best about our site is that we provide our readers and viewer to practice their skills because Practice Puts Brain in Your Muscles. So, Go Ahead and Write a Java program which print your name stored in char Datatype? Answer the Following Question to know how much you have learnt?
  1. What is the Size of char?
    1. 8 bit
    2. 1 byte
    3. Both of The These
  2. What is the Range of char?
    1. 0 to -255
    2. 0 to 255
    3. Non of these
  3. How can we store Capital A in Char x; ?
    1. x='A'
    2. x=64
    3. x="A"
  4. Char variable can store a Single variable. How much variables are required to store the characters 0 to 10.
    1. 1
    2. 11
    3. 10
  5. char x,y; 
    x='A';
    y=x+1;
    System.out.println(y);
    
    What will be the output?
    1. 66
    2. A
    3. B

No comments

Powered by Blogger.