Computer Applications
The method compareTo() returns …………… when two strings are equal and in lowercase :
- true
- 0
- 1
- false
Related Questions
Constructor overloading follows which principle of Object Oriented programming?
- Inheritance
- Polymorphism
- Abstraction
- Encapsulation
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
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
Read the following text, and choose the correct answer:
A class encapsulate Data Members that contains the information necessary to represent the class and Member methods that perform operations on the data member.
What does a class encapsulate?
- Information and operation
- Data members and Member methods
- Data members and information
- Member methods and operation