what are primitive data types give an exampleSolutionBelow
what are primitive data types ? give an example.
Solution
Below are the primitive data types.
1. int eg: int i=1;
2. float eg: float f=1.0f;
3. double eg: double d = 1.0;
4. char eg: char ch = \'a\';
5. boolean eg boolean flag = false;
6. byte eg byte b = 1;
7. short eg short s = 2;
8.long eg long l = 100;
The corresponding Wrapper classes for each primitive types are
1. Integer
2. Float
3. Double
4. Character
5. Boolean
6. Byte
7. Short
8. Long

