Question
class Output
{
public static void main(String args[])
{
String str = "true false true";
boolean x = Boolean.valueOf(str);
System.out.print(x);
}
}
a.
True
b.
False
c.
Compilation Error
d.
Runtime Error
Posted under Java Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. Which of these class contains all the methods present in Math class?
View solution
Q. Which of these method return a pseudorandom number?
View solution
Q. Which of these method returns the remainder of dividend / divisor?
View solution
Q. Which of these method converts radians to degrees?
View solution
Q. toRadian() and toDegree() methods were added by which version of Java?
View solution
Q. Which of these classes encapsulate runtime environment?
View solution
Q. Which of the following exceptions is thrown by every method of Runtime class?
View solution
Q. Which of these methods returns the total number of bytes of memory available to the program?
View solution
Q. Which of these Exceptions is thrown by loadClass() method of ClassLoader class?
View solution
Q. Which of these classes encapsulate runtime state of an object?
View solution
Q. Which of these methods returns the class of an object?
View solution
Q. Which of these methods return a class object given its name?
View solution
Q. Which of these class defines how the classes are loaded?
View solution
Q. Which of the interface contains all the methods used for handling thread related operations in Java?
View solution
Q. Which of these class is used to make a thread?
View solution
Q. Which of this interface is implemented by Thread class?
View solution
Q. Which of these methods of a Thread class is used to suspend a thread for a period of time?
View solution
Q. Which object Java application uses to create a new process?
View solution
Q. Which of the following is true about Java system properties?
View solution
Q. Java system properties can be set at runtime.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!