1.

Which of these methods is used to know whether a string contains “true”?(a) valueOf()(b) valueOfString()(c) getString()(d) none of the mentionedI got this question by my college director while I was bunking the class.My enquiry is from Java.lang topic in section Exploring java.lang & java.io of Java

Answer» RIGHT answer is (a) valueOf()

Best explanation: valueOf() RETURNS true if the specified string contains “true” in lower or UPPERCASE and FALSE OTHERWISE.


Discussion

No Comment Found

Related InterviewSolutions