Latest Qualification Jobs

Java Online Test: MCQ, Questions & Answers For Preparation (Updated 2021)

Java Online Test

For pre-employment screening stage, Java online test is the most essential test. Java Online Test evaluates the knowledge of candidates in java programming language. For best preparation of aspirants, we have updated here Java practice Test Questions and Answers in MCQ format updated as per 2021.

recruitmentresult.com

Java Online Test

Java Online Test MCQ Updated 2021:

Q1. Java was originally developed by –

  1. Brendan Eich
  2. James Gosling
  3. Tim Berners-Lee
  4. Guido van Rossum

Answer: James Gosling

Q2. Which of the following function is used to find and fix bugs in the Java programs ?

  1. JVM
  2. JDK
  3. JRE
  4. JDB

Answer: JDB

Q3. _________is the return type of the hashCode() method in the Object class?

  1. int
  2. Object
  3. void
  4. long

Answer: int

Q4. Which of the following option is a valid long literal?

  1. L990023
  2. ABH8097
  3. 904423
  4. 0xnf029L

Answer: 0xnf029L

Check Here: Java Developer Salary in India

Q5. A single read/write operation performs _____ In character stream I/O.

  1. Eight bytes read/write at a time
  2. Two bytes read/write at a time
  3. One byte read/write at a time
  4. Five bytes read/ write at a time

Answer: Two bytes read/write at a time

Q6. ______________ is the order of variables in Enum?

  1. Descending order
  2. Ascending order
  3. Random order
  4. Depends on the order

Answer: Ascending order

Q7. Which of the following method returns the elements of Enum class?

  1. getEnumList()
  2. getEnum()
  3. getEnumConstants()
  4. getEnums()

Answer: getEnumConstants()

Q8. Which of the following is the limitation of toString() method of BigDecimal?

  1. toString returns null
  2. toString uses scientific notation
  3. toString returns the number in expanded form
  4. None of the above

Answer: toString uses scientific notation

Q9. BigDecimal is a part of___________ package?

  1. java.math
  2. java.lang
  3. java.util
  4. java.io

Answer: java.math

Download PDF: Detailed Advanced Java Syllabus

Q10. The LocalTime represents –

  1. Time without Date
  2. Date without time
  3. Date and Time
  4. Date and Time with timezone

Answer: Time without Date

Q11. How to get UTC time using Java ?

  1. Date.getUTC();
  2. Time.getUTC();
  3. Instant.now();
  4. TimeZone.getUTC();

Answer: Instant.now();

Q12. Literals in java must be appended by –

  1. D
  2. I
  3. L
  4. L & l

Answer: L & l

Q13. Which of the following is Truncation is Java?

  1. Integer value assigned to floating type
  2. Integer value assigned to floating type
  3. Floating-point value assigned to an integer type
  4. Floating-point value assigned to an Floating type

Answer: Floating-point value assigned to an integer type

Q14. Arrays are _______ in Java?

  1. primitive data type
  2. objects
  3. object references
  4. None of These

Answer: objects

Q15. _____ legally declare, construct and initialize an array

  1. int [] myList = (5, 8, 2);
  2. int myList [] = {4, 3, 7};
  3. int myList [] [] = {4,9,7,0};
  4. None of These

Answer: . int myList [] = {4, 3, 7};

Q16. When you passed an array to a method, the method receives –

  1. A copy of the array
  2. The length of the array
  3. A copy of the first element
  4. The reference of the array

Answer: The reference of the array

Q17. An attempt to add null key to a TreeMap will result in

  1. Runtime – NullPointerException
  2. Compile time Exception
  3. Eror
  4. None of These

Answer: Runtime – NullPointerException

Q18. Which of the following keywords is used to define packages in Java?

  1. Pkg
  2. pkg
  3. package
  4. Package

Answer: package

Q19. _________is the correct way of importing an entire package ‘pkg’.

  1. Import pkg.
  2. import pkg.
  3. Import pkg.*
  4. import pkg.*

Answer: import pkg.*

Q20. Which of the following method of class String is used to obtain length of String

object?

  1. lengthof()
  2. Sizeof()
  3. length()
  4. lengthoff()

Answer: length()

Download PDF : Java Online Test MCQ Updated 2021

Q21. What is the range of short data type in Java?

  1. -128 to 127
  2. -32768 to 32767
  3. -2147483648 to 2147483647
  4. None of the Above

Answer: 32768 to 32767

Q22. Which data type value is returned by all transcendental math functions?

  1. int
  2. float
  3. long
  4. double

Answer: double

Q23. Which of these coding types is used for data type characters in Java?

  1. ASCII
  2. UNICODE
  3. ISO-LATIN-1
  4. All of the Above

Answer: UNICODE

Q24. Which one is a valid declaration of a boolean?

  1. boolean b1 = 1;
  2. boolean b4 = ‘true’
  3. boolean b3 = false;
  4. boolean b2 = ‘false’;

Answer: boolean b3 = false;

Q25. Which of the following method returns the elements of Enum class?

  1. getEnum()
  2. getEnums()
  3. getEnumList()
  4. getEnumConstants()

Answer: . getEnumConstants()

Q26. BigDecimal is a part of …………… package.

  1. java.io
  2. java.util
  3. java.math
  4. java.lang

Answer: java.math

Q27. How to format date from one form to another?

  1. DateFormat
  2. DateConverter
  3. SimpleFormat
  4. SimpleDateFormat

Answer: SimpleDateFormat

Q28. Which of these is long data type literal?

  1. 0x99fffL
  2. 0x99fffa
  3. AbcDefG
  4. None of the above

Answer: 0x99fffL

Q29. Which of these is an incorrect array declaration?

  1. int arr[] = new int[5]
  2. int arr[] = new int[5]
  3. int arr[] = int [5] new
  4. None of above

Answer: . int arr[] = int [5] new

Q30. Modulus operator, %, can be applied to which of these?

  1. Integers
  2. Floating – point numbers
  3. Both Integers and floating – point numbers
  4. None of the above

Answer: Both Integers and floating – point numbers

Read Also: Last Minute Exam Preparation Tips

Online Java Test For Freshers As Well As For Experienced:

Online java coding test has designed for especially for both the contenders these are fresher’s as well as for experienced. Java is a simplified object-oriented programming language which is used for designed programs. Aspirants seeking jobs related to java and those applicants want promotion in the field of java must go through java MCQ online test.

There are so many sites which are serving by providing java online test practice questions. Some, we have given in underneath of this page. Students should scroll down this page for getting complete info.

  • ibm online test for java experienced
  • amdocs online test for java
  • amdocs online test for java
  • amdocs online test questions for java experienced
  • amdocs online test for java developer

Do You Know: How to Solve a Problem in Exam Correctly

Java Online Mock Test 2021:

Java Online Test Series will develop programming skills and enhance speed of solving online core java test questions. Java online test or Java Mock Test plays an important role for all those students who are preparing for appearing in any competition exam. Java Quiz Questions providing on this page focused on every topic of Java language.

Students should take Java Online Quiz for their systematic preparation. Those contenders who have desire to sharpen their skills in java language must take core java test online. Through advanced java Online Quiz, aspirants will get ready for Java Interviews, online test for java, examinations and certifications.


Excel Your Preparation with Vidya24.Com - Enroll Today For Free

Filed in: online quiz

Leave a Reply

Submit Comment

© Recruitment result 2021. All rights reserved.