Online Exam Quiz

questionQuestion  1 to 30

Which of the following is used to create an array in Java?

  • new
  • create
  • array
  • instance
Mark for review

Which of these methods is used to find the length of a string in Java?

  • length()
  • size()
  • getLength()
  • getSize()
Mark for review

Which of the following is a reserved keyword in Java?

  • array
  • goto
  • null
  • constant
Mark for review

Which of the following is true about Java?

  • Java is platform-independent
  • Java is a procedural language
  • Java does not support multithreading
  • Java is not object-oriented
Mark for review

Which of the following statements is true about Java?

  • Java is a platform-independent language
  • Java is a procedural language
  • Java is a pure object-oriented language
  • Java supports both procedural and object-oriented programming
Mark for review

Which of the following is not a valid method of the HashSet class in Java?

  • add()
  • remove()
  • size()
  • length()
Mark for review

Which of these classes is a part of Java's Collections framework?

  • Stack
  • ArrayList
  • HashSet
  • All of the above
Mark for review

Which of the following is used to handle exceptions in Java?

  • try-catch
  • throw
  • throws
  • All of the above
Mark for review

Which of the following is not a state of a thread?

  • New
  • Runnable
  • Blocked
  • Running
Mark for review

In Java, what is the correct syntax to output "Hello World"?

  • System.out.println("Hello World");
  • print("Hello World");
  • echo("Hello World");
  • Console.WriteLine("Hello World");
Mark for review

Which method is used to start a thread in Java?

  • run()
  • start()
  • begin()
  • init()
Mark for review

Which of the following is not a wrapper class in Java?

  • Integer
  • Double
  • Character
  • int
Mark for review

Which keyword is used to inherit a class in Java?

  • extends
  • implements
  • inherits
  • super
Mark for review

What is the use of the 'final' keyword in Java?

  • To define constants
  • To prevent method overriding
  • To prevent inheritance
  • All of the above
Mark for review

Which of the following is used to create an interface in Java?

  • interface
  • class
  • implements
  • extends
Mark for review

Which of the following is not a valid method of the Math class in Java?

  • abs()
  • ceil()
  • floor()
  • round()
Mark for review

Which keyword is used for accessing the features of a package?

  • package
  • import
  • extends
  • implements
Mark for review

Which class is used to read characters from a file?

  • FileReader
  • BufferedReader
  • FileInputStream
  • FileWriter
Mark for review

Which of the following is used to create an object in Java?

  • new
  • create
  • object
  • instance
Mark for review

Which method is used to perform some action when an object is to be destroyed?

  • finalize()
  • delete()
  • remove()
  • destructor()
Mark for review

Which of the following is used to create a static method in Java?

  • static
  • method
  • function
  • procedure
Mark for review

What is the default encoding for an InputStreamReader?

  • UTF-8
  • ASCII
  • ISO-8859-1
  • UTF-16
Mark for review

Which of the following is not a type of constructor?

  • Default constructor
  • No-argument constructor
  • Parameterized constructor
  • Copy constructor
Mark for review

Which of the following is a marker interface?

  • Serializable
  • Cloneable
  • Remote
  • All of the above
Mark for review

Which of the following is used to create a synchronized block in Java?

  • synchronized
  • sync
  • lock
  • thread
Mark for review

Which of the following is used to create a final class in Java?

  • final
  • class
  • interface
  • extends
Mark for review

Which of the following is used to create a native method in Java?

  • native
  • method
  • function
  • procedure
Mark for review

Which of the following is a marker interface?

  • Serializable
  • Cloneable
  • Remote
  • All of the above
Mark for review

Which is not a valid way to declare an array in Java?

  • int arr[] = new int[5];
  • int arr[] = {1, 2, 3, 4, 5};
  • int arr[];
  • int arr[5] = new int[];
Mark for review

Which of these is not a valid component of the Android architecture?

  • Intent
  • Activity
  • Services
  • Action
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review