Computer Applications
Assertion (A): Call by value is known as pure method.
Reason (R): The original value of variable does not change as operation is performed on copied values.
- 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
Answer
Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A)
Reason — Call by value is known as pure method as it does not modify the value of original variables. The original value of variable does not change as operation is performed on copied values.
Related Questions
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
What will be the output for:
System.out.print(Character.toLowerCase('1'));- 0
- 1
- A
- true
Write the Java expression for (p + q)2.