Testing test on JAVA P2
Multiple choice questions on Java programming help you test your basic knowledge of this programming language. The set of questions includes 10 sentences to try.
- Question 1. When the compiler encounters an Exception error in the main thread java.lang.NoClassDefFoundError: myprogram. What does this error mean?
- Program path is wrong
-
- There is no main function
- Do not declare class
- There is no public keyword at the beginning of class declaration
-
- Question 2. What is the object in the software?
- Is a bundle of software that consists of related behaviors and states
- Is a defining object of the real world
- An object consisting of behavior and state
- Objects that are represented in software include 2 data field attributes and data processing methods
-
- Question 3. Which of the following is correct?
- public class default {}
- protected inner class engine {}
- final class outer {}
- All is wrong
-
- Question 4. Which of the following is incorrect?
- 2word
- * word
- main
- All is wrong
-
- Question 5. How many main methods will there be in a 2-class program?
- first
- 2
- 3
- 4
-
- Question 6. How many parent classes can a class in Java have?
- first
- 2
- 3
- 4
-
- Question 7. How many subclasses does a class in Java have?
- 2
- 3
- 4
- Countless
-
- Question 8. How do I declare Xedap1 class to inherit Xedap class?
- class Xedap1 extend Xedap {}
- public classs Xedap1 extend Xedap {}
- class Xedap1 extends Xedap {}
- All is wrong
-
- Question 9. Choosing the best answer What is interface?
- A class containing related empty methods
- A reference type, similar to a class, can only contain value constants, method declarations and nested types
- Is an implementation method of another class
- Is the connection layer between the base class and the parent class
-
- Question 10. To use the Xedap interface for class Xedap1, how do we do it?
- class Xedap1 implement Xedap {}
- public class Xedap1 implement Xedap {}
- class Xedap1 implements Xedap {}
- public class Xedap1 extends Xedap {}
-
4.5 ★ | 2 Vote
You should read it
Maybe you are interested
Some classic Fallout games are free on the Epic Games Store
The 5 best apps and websites to watch classic movies
4 classic Linux tools that have better modern alternatives
Restore classic File Explorer with ribbon in Windows 11
RetroArch - Free multi-system emulator for classic gaming
8 Halloween decoration suggestions for impressive classrooms