Question ID :954698538220
Which statments about the output of the following programs are true?
public class TestClass
{
public static void main(
String args[ ] )
{
int i = 0 ;
boolean bool1 = true;
boolean bool2 = false;
boolean bool = false;
bool = (bool2 & method1("1")); //1
bool = (bool2 && method1("2")); //2
bool = (bool1 | method1("3")); //3
bool = (bool1 | | method1("4")); //4
}
public static boolean method1(String str)
{
System.out.println(str);
return true;
}
}
A. 1 will be part of the output
B. 2 will be part of the output
C. 3 will be part of the output
D. 4 will be part of the output