MCQ Single Best Answer Easy

QWhat method is automatically added when you're creating a runnable class instead of a class?

ID: #11007 Module 13: Classes 161 views
Question Info
#11007Q ID
EasyDifficulty
Module 13: ClassesTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A A new method
  • B A static method
  • C A main method
  • D A finalize method
Correct Answer: Option C

Explanation

  • A. Incorrect: A new method is used to create an instance of the class and isn't automatically added to a runnable class.
  • B. Incorrect: A static method is used to work with data in a table and isn't automatically added to a runnable class.

  • C. Correct: A main method is automatically added to a runnable class. Therefore, you would add a runnable class instead of a class to your project.
  • D. Incorrect: A finalize method finalizes the instance of the class. It isn't automatically added to a runnable class.

Share This Question

Challenge a friend or share with your study group.