True or False Questions
1. Java is a compiled language.
2. Java supports multiple inheritance with classes.
3. The main
method in Java must always be named start
.
4. Java is platform-independent
5. In Java, variables must be declared before they are used.
6. You can create a Java program without a class.
7. Java uses pointers to directly access memory.
8. The final
keyword in Java makes a variable constant.
9. Java arrays are dynamically resizable like ArrayList.
10. Java was developed by Sun Microsystems.
Answer
1. Java is a compiled language.
✅ True
Java code is compiled into bytecode which runs on the JVM
2. Java supports multiple inheritance with classes.
❌ False
Java does not allow multiple inheritance with classes, only with interfaces.
3. The main
method in Java must always be named start
.
❌ False
It must be named main
.
4. Java is platform-independent
✅ True
Thanks to the Java Virtual Machine (JVM), Java can run on any platform.
5. In Java, variables must be declared before they are used.
✅ True
Java is statically typed, so variables need declaration.
6. You can create a Java program without a class.
❌ False
Every Java application must have at least one class.
7. Java uses pointers to directly access memory.
❌ False
Java does not allow direct memory access via pointers for safety.
8. The final
keyword in Java makes a variable constant.
✅ True
A final
keyword in Java makes a variable constant.
9. Java arrays are dynamically resizable like ArrayList.
❌ False
Arrays in Java have a fixed size once declared.
10. Java was developed by Sun Microsystems.
✅ True
Java was originally developed by Sun Microsystems in the mid-1990s.
Top comments (0)