Character Datatype Example Java Program
Definition
The char data type is a single 16-bit Unicode character. It has a minimum value of '\u0000' (or 0) and a maximum value of '\uffff' (or 65,535 inclusive).Syntax
char varibale_name = 'any_single_charecter';
Syntax Example
char gear = 'A';
Character Datatype Example Program
class CharacterDatatype{ public static void main(String[] args){ char c='m'; System.out.println("The character is: "+c); } }
Sample Output
Output is: The character is: m
Data Type Programs
Read More Articles
- Multiple Inheritance Using Interface Example Java Program
- Single Inheritance Example Java Program
- Multilevel Inheritance Example Java Program
- Hierarchical Inheritance Example Java Program
- Find all Substrings of a given string Example Java Program
- Create Matrix Example Java Program
- Sum Of Three Numbers Example Java Program
- Twin Prime Example Java Program
- Heap Sort Example Java Program
- Compile Time Polymorphism Example Java Program