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.
Java Online Test
Java Online Test MCQ Updated 2021:
Q1. Java was originally developed by –
- Brendan Eich
- James Gosling
- Tim Berners-Lee
- Guido van Rossum
Answer: James Gosling
Q2. Which of the following function is used to find and fix bugs in the Java programs ?
- JVM
- JDK
- JRE
- JDB
Answer: JDB
Q3. _________is the return type of the hashCode() method in the Object class?
- int
- Object
- void
- long
Answer: int
Q4. Which of the following option is a valid long literal?
- L990023
- ABH8097
- 904423
- 0xnf029L
Answer: 0xnf029L
Check Here: Java Developer Salary in India
Q5. A single read/write operation performs _____ In character stream I/O.
- Eight bytes read/write at a time
- Two bytes read/write at a time
- One byte read/write at a time
- Five bytes read/ write at a time
Answer: Two bytes read/write at a time
Q6. ______________ is the order of variables in Enum?
- Descending order
- Ascending order
- Random order
- Depends on the order
Answer: Ascending order
Q7. Which of the following method returns the elements of Enum class?
- getEnumList()
- getEnum()
- getEnumConstants()
- getEnums()
Answer: getEnumConstants()
Q8. Which of the following is the limitation of toString() method of BigDecimal?
- toString returns null
- toString uses scientific notation
- toString returns the number in expanded form
- None of the above
Answer: toString uses scientific notation
Q9. BigDecimal is a part of___________ package?
- java.math
- java.lang
- java.util
- java.io
Answer: java.math
Download PDF: Detailed Advanced Java Syllabus
Q10. The LocalTime represents –
- Time without Date
- Date without time
- Date and Time
- Date and Time with timezone
Answer: Time without Date
Q11. How to get UTC time using Java ?
- Date.getUTC();
- Time.getUTC();
- Instant.now();
- TimeZone.getUTC();
Answer: Instant.now();
Q12. Literals in java must be appended by –
- D
- I
- L
- L & l
Answer: L & l
Q13. Which of the following is Truncation is Java?
- Integer value assigned to floating type
- Integer value assigned to floating type
- Floating-point value assigned to an integer type
- Floating-point value assigned to an Floating type
Answer: Floating-point value assigned to an integer type
Q14. Arrays are _______ in Java?
- primitive data type
- objects
- object references
- None of These
Answer: objects
Q15. _____ legally declare, construct and initialize an array
- int [] myList = (5, 8, 2);
- int myList [] = {4, 3, 7};
- int myList [] [] = {4,9,7,0};
- None of These
Answer: . int myList [] = {4, 3, 7};
Q16. When you passed an array to a method, the method receives –
- A copy of the array
- The length of the array
- A copy of the first element
- The reference of the array
Answer: The reference of the array
Q17. An attempt to add null key to a TreeMap will result in
- Runtime – NullPointerException
- Compile time Exception
- Eror
- None of These
Answer: Runtime – NullPointerException
Q18. Which of the following keywords is used to define packages in Java?
- Pkg
- pkg
- package
- Package
Answer: package
Q19. _________is the correct way of importing an entire package ‘pkg’.
- Import pkg.
- import pkg.
- Import pkg.*
- import pkg.*
Answer: import pkg.*
Q20. Which of the following method of class String is used to obtain length of String
object?
- lengthof()
- Sizeof()
- length()
- lengthoff()
Answer: length()
Download PDF : Java Online Test MCQ Updated 2021
Q21. What is the range of short data type in Java?
- -128 to 127
- -32768 to 32767
- -2147483648 to 2147483647
- None of the Above
Answer: 32768 to 32767
Q22. Which data type value is returned by all transcendental math functions?
- int
- float
- long
- double
Answer: double
Q23. Which of these coding types is used for data type characters in Java?
- ASCII
- UNICODE
- ISO-LATIN-1
- All of the Above
Answer: UNICODE
Q24. Which one is a valid declaration of a boolean?
- boolean b1 = 1;
- boolean b4 = ‘true’
- boolean b3 = false;
- boolean b2 = ‘false’;
Answer: boolean b3 = false;
Q25. Which of the following method returns the elements of Enum class?
- getEnum()
- getEnums()
- getEnumList()
- getEnumConstants()
Answer: . getEnumConstants()
Q26. BigDecimal is a part of …………… package.
- java.io
- java.util
- java.math
- java.lang
Answer: java.math
Q27. How to format date from one form to another?
- DateFormat
- DateConverter
- SimpleFormat
- SimpleDateFormat
Answer: SimpleDateFormat
Q28. Which of these is long data type literal?
- 0x99fffL
- 0x99fffa
- AbcDefG
- None of the above
Answer: 0x99fffL
Q29. Which of these is an incorrect array declaration?
- int arr[] = new int[5]
- int arr[] = new int[5]
- int arr[] = int [5] new
- None of above
Answer: . int arr[] = int [5] new
Q30. Modulus operator, %, can be applied to which of these?
- Integers
- Floating – point numbers
- Both Integers and floating – point numbers
- 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.
WOW just what I was looking for. Came here by searching
Hi Jav Stream,
Thank you for appreciating our work. Please Stay connected with us for more updated information.