Question
class Output {
public static void main(String args[]) {
String str = "true false";
boolean x = Boolean.parseBoolean(str);
System.out.print(x);
}
}
What is the output of this program?
class Output {
public static void main(String args[]) {
String str = "true false";
boolean x = Boolean.parseBoolean(str);
System.out.print(x);
}
}
Answer: Option B
Was this answer helpful ?
parseBoolean() Parses the string argument as a boolean. The boolean returned
Was this answer helpful ?
More Questions on This Topic :
Question 10.
What is the output of this program?
class Outpu....
Submit Solution