Q: Which type of class should be created in order to run a job?
-
A
A runnable class
-
B
A normal class
-
C
A static class
-
D
A public class
A
Answer:
A
Explanation:
Justification:
- A runnable class is a class that can be used as a startup object in a project. It contains a static main method. The main method is the entry point of your job.
- A normal class should not be used when testing random code samples
- A static class is not a valid class
- A public class implies that the methods from the class can be accessed anywhere. However, to test code, you should use a runnable class that contains a static main method.
Related Lesson: Methods
Related Topic:
Share Above MCQ