ExamVeda
Login
Home
Data Types and Variables
?

The following program:
public class Test{ 
        static boolean isOK;
        public static void main(String args[]){
                System.out.print(isOK);
        } 
}

Answer & Solution
Correct Answer: Option B
By default, a boolean variable will contain false.
Examveda
Question posted by Examveda
Community

Join the Discussion

8 Comments
Rajesh C
Rajesh C 7 years ago
May be in boolean 1)true =true
2) istrue = false
Test Test
Test Test 9 years ago
How can it be FALSE, can someone explain?
Shilpi Sahu
Shilpi Sahu 9 years ago
by default, a boolean variable will contain false.
Neel Pandey
Neel Pandey 9 years ago
static boolean isOK;
static variables gets always get initialized with some values and because this is BOOLEAN TYPE hence default initialization value=FALSE
Gowri
Gowri 9 years ago
boolean datatype always set its initial valuue as false
Priyanka Mane
Priyanka Mane 10 years ago
By default value of isok is false(i.e value of boolean var is false)
DEBKUMAR GIRI
DEBKUMAR GIRI 10 years ago
i don't understand..please explain it..
Ajay Kothalkar
Ajay Kothalkar 10 years ago
Please Explain it.