
JAVA QUIZ - 1
Quiz by Namaivayam M
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
25 questions
Show answers
- Q1Which are the special symbols used to initialize an array at the time of the declaration itself?Braces { }Angled Brackets < >Parentheses ( )Square Brackets [ ]30s
- Q2static int[] nums; public static void main(String args[]) { System.out.println(nums.length); }0Runtime Exception - Null Pointer ExceptionCompiler errornull30s
- Q3int[] marks = {35,65,95}; System.out.print(marks.length + "," + marks[1]);3,652,653,653,9530s
- Q4If an index of an element is N, what is its actual position in the array?N+2N+1NN-130s
- Q5in Java, add a ___ to a constructor to convert it into a method.semicolonif statementstaticreturn type30s
- Q6Java method signature is a combination of ___.Return typeAll the aboveMethod nameArgument List30s
- Q7In Java, a method name can not start with a ___.# (pound)(Hyphen)Allnumber30s
- Q8A "this" operator used inside a Java method refers to ___ variableGlobal variableNoneMethod local variableInstance variable30s
- Q9public class TestingMethods5 { public static void main(String[] args) { int localVariable; System.out.println(localVariable); } }0Compiler errorgarbage valueNullPointerException30s
- Q10In Java, local variables are stored in __ memory and instance variables are stored in ___ memory.Heap, HeapHeap, StackStack, StackStack, Heap30s
- Q11In Java programming language, the code is placed inside ___.AllMethodsBlocksClasses, Interfaces30s
- Q12Properties are implemented using ___ in Java.MethodsVariablesPackagesInterfaces30s
- Q13After compilation, an Interface or Abstract-Class is kept in a ___ file in Java programming..class.java.interface.cls30s
- Q14In a .java file, how many numbers of public types namely class, interface or abstract can be managed?Any Number23130s
- Q15How many maximum numbers of objects can be created from a single Class in Java?3264256None30s