Java
T
point
Home
Python
Java
JavaScript
HTML
SQL
PHP
C#
C++
DS
Aptitude
Reasoning
Selenium
DBMS
C
Android
Interview Q
Content Menu ▼
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Question 1
:
public void testIfA() {
if (testIfB("True")) {
System.out.println("True");
} else {
System.out.println("Not true");
}
}
public Boolean testIfB(String str) {
return Boolean.valueOf(str);
}
What is the result when method testIfA is invoked?
1.
True
2.
Not true
3.
An exception is thrown at runtime.
4.
Compilation fails because of an error at line 12.