1
(a) What are the default values of the primitive data type int and float?
Show SolutionHide Solution↓
Default value of int is 0 and float is 0.0f.
(b) Name any two OOP’s principles.
- Encapsulation
- Inheritance
(c) What are identifiers ?
Identifiers are symbolic names given to different parts of a program such as variables, methods, classes, objects, etc.
(d) Identify the literals listed below:
(i) 0.5 (ii) 'A' (iii) false (iv) "a"
- Real Literal
- Character Literal
- Boolean Literal
- String Literal
(e) Name the wrapper classes of char type and boolean type.
Wrapper class of char type is Character and boolean type is Boolean.