L-2 Class and Objects
Quiz by Archana Shelke
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
15 questions
Show answers
- Q11. All methods and variables in Java language are kept inside a?mainstatic methodFileClass or Interface60s
- Q22. In an object oriented programmingClasses use methods to communicate between themClass create objectsNone of theseObjects create classes60s
- Q33. What is the need to mention "static" before main method?Both A and BB. To make main method as class method common to all instancesNone of the aboveA. To call main method without creating an object of class60s
- Q44. In standalone Java applications, which method is mandatory?print methodshow methodmain methoddisplay method60s
- Q55. What is the use of Access modifier "pubic" in Java language?None of the aboveTo call the main method outside of Class or Package by JVMTo protect main methodTo hide the main method from misuse60s
- Q66. Choose a Single Line Comment in Java Language below?Some comments///*Some comments*/*/Some comments/*//Some comments60s
- Q77. Choose a multiline comment in Java language below?//comments are going cars are moving//*/comments are going cars are moving/*/*comments are going cars are moving*/60s
- Q88. String args[] in main method are used for? public static void main(String args[]) { // }NothingPassing arguments at run timeCounting number of wordsPassing arguments at compile time60s
- Q99. What is the default return type of a method in Java language?shortintNone of thesevoid60s
- Q1010. Choose a correct version of Java Documentation Comment?/** comments **//* comments **//** comments *//* comments */60s
- Q1111. A Java class can contain___.Methods, ConstructorsVariablesAll of theseInner Classes (A class inside another class)60s
- Q1212. How many maximum numbers of objects can be created from a single Class in Java?64None2563260s
- Q1313. In Java, the keyword used to declare a class is ___.ClassJavajavaclass60s
- Q1414. Choose the correct statements about choosing a name for a class in Java.The class name can not start with a numberThe class name can start with only a letter or underscore or dollar sign.All of theseThe class name can contain numbers60s
- Q1515. Choose the correct way of creating an object of the below class. class Table { Table(){System.out.println("Table Created");} }None of theseTable() t = new Table();Table t = new Table;Table t = new Table();60s