-
Program path is wrong
-
- There is no main function
-
Do not declare class
-
There is no public keyword at the beginning of class declaration
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?
-
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
Read More
- JAVA test on P3
- What is A/B testing? What is the process of performing A/B Test?
- eQuiz - Quiz on Core Java - Part 2
- JAVA test on P4
- JAVA test test P1
- JAVA test on P6
- Test on JAVA test P7
- eQuiz - Quiz on Core Java - Part 1
- eQuiz - Multiple choice test on Java Swing Practice - Part 2
- Learn about Penetration Testing
- What is Java? Why choose Java?
- 9 things Java programmers should know in 2018 if they want a successful career
- Test on JAVA P10 test
- Test on JAVA test on P9