public class Pvf{
static boolean Paddy;
public static void main(String argv[]){
System.out.println(Paddy);
}
}
1) Compile time error
2) compilation and output of false
3) compilation and output of true
4) compilation and output of null
Answer 2:
2) compilation and output of false
A variable defined at class level will always be given a default value and the default value for the primitive type boolean is false
No comments:
Post a Comment