3.30 Java Basics and Control Loops
(iii) Object is a class variable
(iv) Scope of the variable is local
(a) ii and iii (b) i and ii (c) i, ii and iii (d) iii and iv
6. Which of the following statements are true in respect of operators of Java?
(i) Arithmetic operators have the same priority
(ii)
* / % have the same priority
(iii) The priority of
+ - is higher than the priority of * /
(iv) Association for arithmetic operators is from left to right
(a) ii and iv (b) i and ii (c) i, ii and iii (d) iii and iv
7. Modulus operator can only be applied to integer data types TRUE/FALSE
Short-answer Questions
8. What are the different data types of Java?
9. Distinguish a variable and constant with examples.
10. Explain type casting ...