Online Exam Quiz

questionQuestion  1 to 30

Which of these is a correct interface not used in the Collection framework?

  • Set
  • SortedList
  • List
  • Map
Mark for review

Which method is used to convert a string into a double in Java?

  • parseDouble()
  • valueOf()
  • convert()
  • toDouble()
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 is not a Java keyword?

  • static
  • Boolean
  • void
  • private
Mark for review

What does JVM stand for?

  • Java Very Machine
  • Java Virtual Machine
  • Java Verified Machine
  • Java Variable Machine
Mark for review

Which class is used to read characters from a file?

  • FileReader
  • BufferedReader
  • FileInputStream
  • FileWriter
Mark for review

Which method is used to start a thread in Java?

  • run()
  • start()
  • begin()
  • init()
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

What is the extension of compiled Java classes?

  • .js
  • .txt
  • .class
  • .java
Mark for review

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

  • Integer
  • Float
  • Character
  • String
Mark for review

Which of the following is not a valid keyword in Java?

  • static
  • void
  • private
  • constant
Mark for review

Which is a valid declaration of a char?

  • char ch = '\utea';
  • char ch = '\uface';
  • char ch = 'face';
  • char ch = 'afe';
Mark for review

Which of these data types is used to store text in Java?

  • int
  • float
  • char
  • String
Mark for review

What does the 'static' keyword mean in Java?

  • The variable or method is specific to an instance of a class
  • The variable or method is specific to the class
  • The variable or method can be accessed anywhere
  • None of the above
Mark for review

Which of the following is not a reserved keyword in Java?

  • interface
  • enum
  • goto
  • NULL
Mark for review

What is the default value of the boolean data type in Java?

  • TRUE
  • FALSE
  • 0
  • null
Mark for review

Which of these is a mechanism for cleaning the internal state of an object before it is removed from memory?

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

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

  • native
  • method
  • function
  • procedure
Mark for review

What is the return type of the hashCode() method in Java?

  • int
  • long
  • float
  • double
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 used to create a final class in Java?

  • final
  • class
  • interface
  • extends
Mark for review

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

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

Which of the following is not a valid operator in Java?

  • +
  • -
  • *
  • **
Mark for review

Which of the following is used to read data from a file in Java?

  • FileReader
  • FileWriter
  • FileInputStream
  • FileOutputStream
Mark for review

Which of the following is used to create a volatile variable in Java?

  • volatile
  • variable
  • var
  • volatileVar
Mark for review

Which of the following is not a valid access modifier in Java?

  • public
  • private
  • protected
  • package
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 the following is used to create a strictfp method in Java?

  • strictfp
  • method
  • function
  • procedure
Mark for review

Which of the following is a valid declaration of a byte?

  • byte b = 128;
  • byte b = 0;
  • byte b = -129;
  • byte b = 256;
Mark for review

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

  • add()
  • remove()
  • size()
  • length()
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