What is the default value of a local variable of data type boolean in Java?
- 1
- 0
- FALSE
- TRUE
Local variables in Java don't have default values. They must be initialized before use. However, for class-level variables of boolean type, the default value is false.
Loading...
Related Quiz
- A thread that goes into the ________ state will not be brought back to the running state when its sleep time has elapsed or its operation is complete.
- Which of the following classes is mainly used to establish a connection to the database in JDBC?
- If a class has multiple constructors, it can be said to have constructor ________.
- Deadlock occurs when two or more threads are blocked forever, each waiting for the other to ________.
- What does the substring method of the String class do?