placeholder image to represent content

JAVA QUIZ - 1

Quiz by Namaivayam M

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
25 questions
Show answers
  • Q1
    Which are the special symbols used to initialize an array at the time of the declaration itself?
    Braces { }
    Angled Brackets < >
    Parentheses ( )
    Square Brackets [ ]
    30s
  • Q2
    static int[] nums; public static void main(String args[]) { System.out.println(nums.length); }
    0
    Runtime Exception - Null Pointer Exception
    Compiler error
    null
    30s
  • Q3
    int[] marks = {35,65,95}; System.out.print(marks.length + "," + marks[1]);
    3,65
    2,65
    3,65
    3,95
    30s
  • Q4
    If an index of an element is N, what is its actual position in the array?
    N+2
    N+1
    N
    N-1
    30s
  • Q5
    in Java, add a ___ to a constructor to convert it into a method.
    semicolon
    if statement
    static
    return type
    30s
  • Q6
    Java method signature is a combination of ___.
    Return type
    All the above
    Method name
    Argument List
    30s
  • Q7
    In Java, a method name can not start with a ___.
    # (pound)
    (Hyphen)
    All
    number
    30s
  • Q8
    A "this" operator used inside a Java method refers to ___ variable
    Global variable
    None
    Method local variable
    Instance variable
    30s
  • Q9
    public class TestingMethods5 { public static void main(String[] args) { int localVariable; System.out.println(localVariable); } }
    0
    Compiler error
    garbage value
    NullPointerException
    30s
  • Q10
    In Java, local variables are stored in __ memory and instance variables are stored in ___ memory.
    Heap, Heap
    Heap, Stack
    Stack, Stack
    Stack, Heap
    30s
  • Q11
    In Java programming language, the code is placed inside ___.
    All
    Methods
    Blocks
    Classes, Interfaces
    30s
  • Q12
    Properties are implemented using ___ in Java.
    Methods
    Variables
    Packages
    Interfaces
    30s
  • Q13
    After compilation, an Interface or Abstract-Class is kept in a ___ file in Java programming.
    .class
    .java
    .interface
    .cls
    30s
  • Q14
    In a .java file, how many numbers of public types namely class, interface or abstract can be managed?
    Any Number
    2
    3
    1
    30s
  • Q15
    How many maximum numbers of objects can be created from a single Class in Java?
    32
    64
    256
    None
    30s

Teachers give this quiz to your class