Computer Applications
Which of the following is a valid Integer constant:
i. 4
ii. 4.0
iii. 4.3f
iv. "four"
- Only i
- i and iii
- ii and iv
- i and ii
Related Questions
Name the package that contains wrapper classes:
- java.lang
- java.util
- java.io
- java.awt
Constructor overloading follows which principle of Object Oriented programming?
- Inheritance
- Polymorphism
- Abstraction
- Encapsulation
The method compareTo() returns …………… when two strings are equal and in lowercase :
- true
- 0
- 1
- false
Assertion (A): In Java, statements written in lower case letter or upper case letter are treated as the same.
Reason (R): Java is a case sensitive language.
- Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A)
- Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A)
- Assertion (A) is true and Reason (R) is false
- Assertion (A) is false and Reason (R) is true