JAVA

JAVA

Java is a general-purpose programming language that is class-based, object-oriented, and ... were added to the Java language, as part of J2SE 5.0. Prior to the introduction of generics, each variable declaration had to be of a specific type, etc.



Java Online Mcq Test With Answers

Mycodeskills have a java online mcq test with answers. With the help of these MCQs, you can prepare for your Java interview. Mycodeskills have all three-level tests beginners, intermediate and advance. Pass this online java quiz and get your certificate for free. Boost your java coding skills with Mycodeskills.


 

karim sidisaid

karim sidisaid

Beginner 0%

Harshavardhan Bairi

Harshavardhan Bairi 👍

Beginner 60%

Brandon McHone

Brandon McHone

Intermediate 34%

Brandon McHone

Brandon McHone

Advanced 15%

Brandon McHone

Brandon McHone

Beginner 10%

Shiva Swamy

Shiva Swamy

Beginner 40%

omar goda

omar goda 👍

Intermediate 67%

Edgar Quinones

Edgar Quinones

Beginner 0%

Ricardo Marquez

Ricardo Marquez

Intermediate 47%

Leandro León

Leandro León

Intermediate 34%

pgm 2020

pgm 2020

Advanced 10%

pgm 2020

pgm 2020 👍

Intermediate 80%

pgm 2020

pgm 2020 👍

Beginner 70%

Gjoni Pontifex

Gjoni Pontifex

Beginner 50%

ramya T

ramya T

Advanced 40%

kasth cust

kasth cust

Beginner 30%

Gary Davies

Gary Davies

Intermediate 7%

Gary Davies

Gary Davies

Beginner 40%

Balaji Palaniswamy

Balaji Palaniswamy

Intermediate 54%

Balaji Palaniswamy

Balaji Palaniswamy

Beginner 50%

Addanki Kalyani

Addanki Kalyani

Beginner 20%

kawtar mançouri

kawtar mançouri

Advanced 0%

kawtar mançouri

kawtar mançouri 👍

Intermediate 67%

kawtar mançouri

kawtar mançouri 👍

Beginner 80%

Judison O. Gil F.

Judison O. Gil F. 👍

Beginner 70%

Mahfuz Salehin Moaz

Mahfuz Salehin Moaz

Intermediate 0%

Mahfuz Salehin Moaz

Mahfuz Salehin Moaz

Beginner 20%

Manasa Chandrashekar

Manasa Chandrashekar 👍

Beginner 60%

vincent milesi

vincent milesi

Beginner 30%

Ashika Abeysuriya

Ashika Abeysuriya

Beginner 50%

Aye Mon

Aye Mon

Beginner 0%

Bipin parajuli

Bipin parajuli

Beginner 40%

Mahammadarif Shaikh

Mahammadarif Shaikh

Beginner 30%

Akshaya Kumar A

Akshaya Kumar A

Intermediate 34%

Akshaya Kumar A

Akshaya Kumar A 👍

Beginner 70%

Ramadhan Ayieko

Ramadhan Ayieko

Beginner 10%

HASSAN MEHMOOD

HASSAN MEHMOOD

Advanced 20%

santosh sahani

santosh sahani

Beginner 0%

Angelo A R

Angelo A R

Advanced

Angelo A R

Angelo A R

Intermediate

Angelo A R

Angelo A R

Beginner

Jackide Cheruiyot

Jackide Cheruiyot

Advanced

Jackide Cheruiyot

Jackide Cheruiyot

Beginner

Kunjan Bharambe

Kunjan Bharambe

Beginner 40%

Sonu Thapa Kshetri

Sonu Thapa Kshetri

Beginner 10%


Questions

  1. Which of these is not an event listener adapter defined in the java.awt.event package?
  2. Which distributed object technology is most appropriate for systems that consist of objects written in different languages and that execute on different operating system platforms?
  3. The transaction attribute of a bean is set to ‘TX_REQUIRES_NEW’. What can be inferred about its behavior?
  4. Which of the following is a well-known HTTP port?
  5. Which of the following methods can be used for reporting a warning on a Connection object, Statement object & ResultSet object?
  6. The principal finder method that must be implemented by every entity bean class is:
  7. How does the set collection deal with duplicate elements?
  8. Why can’t a string’s compareTo method be overridden?
  9. Which class contains a method to create a directory?
  10. Which of these interfaces is the most applicable when creating a class that associates a set of keys with a set of values?
  11. Assuming the following is servlet method for handling HTTPGET request: doGet(HttpServletRequest req, HTTPServletResponse res); how can the request parameter in that servlet be retrieved?
  12. Which of the following is the correct syntax for suggesting that the JVM perform garbage collection?
  13. Which of the following methods should be invoked by the container to get a bean back to its working state?
  14. Which of the following require explicit try/catch exception handling by the programmer?
  15. What protocol is used by the DatagramSocket class?
  16. What is the output of the given program? public class Test117 { { System.out.print("_INIT"); } static { System.out.print("_STATIC"); } Test117(){ System.out.print("_CONST"); } public static void main(String[] args){ System.out.print("_MAIN"); new Test117(); } }
  17. Assuming the tag library is in place and the tag handler is correct, which of the following is the correct way to use a custom tag in a JSP page?
  18. Why would the following code snippet not compile successfully? if (mangoList instanceof List){ System.out.println("true"); }
  19. Choose all valid forms of the argument list for the FileOutputStream constructor shown below:
  20. Which of the following are wrapper classes?
  21. Which of the following illustrates correct synchronization syntax?
  22. With regard to the destroy lifecycle method, identify the correct statements about its purpose or about how and when it is invoked.
  23. Which of these interfaces are used by implementations of models for JTable?
  24. Which of the following is the correct syntax for creating a Session object?
  25. Which code snippet will check for the existence of the file "text.txt" in the current location?
  26. Which of the following is true regarding sleep() and wait() in threaded environments?
  27. Given a method declared as: public static List process(List nums); A programmer wants to use the method like this: // INSERT DECLARATIONS HERE output = process(input); Which pair of declarations could be placed at // INSERT DECLARATIONS HERE to allow the code to compile? (Choose all that apply.)
  28. Which is the right syntax of a javadoc comment for parameter of the method test(int)? public class Test125 { public static void main(String[] args){ new Test125().test(125); } public void test(int a) { for (int i=0; i
  29. what is the correct signature of Main method?
  30. What is the central abstraction of the Java Servlet API?
  31. What is true regarding the User Datagram Protocol (UDP)?
  32. Which of the following will programmatically throw an exception?
  33. Which of the following statements are true regarding declaring a servlet instance in a deployment descriptor?
  34. Which of the following options is a valid declaration?
  35. What is the return type of the method ceil(double) from the Math class
  36. What will happen to the running session beans if the EJB container crashes or restarts?
  37. With regard to the servlet context listener, which of the following methods is valid?
  38. Which interface does java.util.Hashtable implement?
  39. Which of the following is the correct way in Java to show that the class Developer inherits from the parent class Freelancer?
  40. Which of the following are valid Java identifiers?
  41. Which of the following is used to find out that a thread is still running?
  42. Which of the following will compile without any error?
  43. Which annotation defines unique identifier for a JPA entity?
  44. Which keyword is used for implementing an interface in a class?
  45. Which collection class allows you to associate its elements with key values, and allows you to retrieve objects in FIFO (first-in , first-out) sequence?
  46. Which of the following statements regarding abstract classes are true?
  47. Which of the following is a valid declaration of an array?
  48. What is required for EJB asynchronous method?
  49. You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?
  50. Which one of these lists contains only Java programming language keywords?
  51. We have a thread defined and running, which method is used to terminate its execution?
  52. Which is the most restrictive access modifier that will allow members of one class to have access to members of another class in the same package?
  53. Which is a reserved word in the Java programming language?
  54. Which of the following method waits for thread to terminate?
  55. Which of the following are among the rules for defining abstract methods?
  56. Which implicit modifier is applied to all interface methods?
  57. Which of the following are legal variable types in java?
  58. What is the purpose java.exe?
  59. Which of the following class level (non local) variable declarations will not compile?
  60. Which of these packages contain all the Java's built in exceptions?
  61. Which is the best place to store business logic and look of the page?
  62. Which of the following checks are performed by compiler when you override a nonprivate method?
  63. Which of the following is a valid keyword in java?
  64. Is it possible to get mapping information from parent class that entity extends?
  65. Which class does not override the equals() and hashCode() methods, inheriting them directly from class object?
  66. What is the difference between a try-catch block and a try-catch-finally block?
  67. What is usually inside the WEB-INF folder of a typical Java Web Application?
  68. Which statement is true about an anonymous inner class?
  69. Which of the following statements are true?
  70. What is the range of short data type in Java?
  71. What is the range of byte data type in Java?
  72. Which of the following are legal lines of Java code? 1. int w = (int)888.8; 2. byte x = (byte)100L; 3. long y = (byte)100; 4. byte z = (byte)100L;
  73. An expression involving byte, int, and literal numbers is promoted to which of these?
  74. Which of these literals can be contained in float data type variable?
  75. Which data type value is returned by all transcendental math functions?
  76. Which of the following is the advantage of BigDecimal over double?
  77. What is the base of BigDecimal data type?
  78. What is the limitation of toString() method of BigDecimal?
  79. Which of the following is not provided by BigDecimal?
  80. BigDecimal is a part of which package?
  81. What is BigDecimal.ONE?
  82. Which class is a library of functions to perform arithmetic operations of BigInteger and BigDecimal?
  83. Which of these is returned by “greater than”, “less than” and “equal to” operators?
  84. Which of the following operators can operate on a boolean variable? 1. && 2. == 3. ?: 4. +=
  85. Which of these operators can skip evaluating right hand operand?
  86. Which of these statements is correct?
  87. Which of the following is not OOP concept in Java?
  88. Which of the following is a type of polymorphism in Java?
  89. When does method overloading is determined?
  90. When Overloading does not occur?
  91. Which concept of Java is a way of converting real world objects in terms of class?
  92. Which concept of Java is achieved by combining methods and attribute into a class?
  93. What is it called if an object has its own lifecycle and there is no owner?
  94. What is it called where child object gets killed if parent object is killed?
  95. What is it called where object has its own lifecycle and child object cannot belong to another parent object?
  96. Method overriding is combination of inheritance and polymorphism?

Related Articles

Resources

Top 10 C Programming Interview Questions and Answers: Easiest Guide for Job Seekers (2023)
Top 10 C Programming Interview Questions and Answers: Easiest Guide for Job Seekers (2023)

Are you a job seeker preparing for a C programming interview? Congratulations on taking the first st...

The Impact of Artificial Intelligence on Society
The Impact of Artificial Intelligence on Society

Artificial intelligence (AI) is a rapidly developing technology that is having a major impact on so...

How to create images with AI?
How to create images with AI?

what is ai art and how to create? What is AI Art? Artificial Intelligence Art (AI art) is a form of ...

Humans in an Age of AI: What Should We Do?
Humans in an Age of AI: What Should We Do?

Artificial intelligence (AI), also known as machine learning, is the capacity of machines to learn a...

What is Scratch Programming Language?
What is Scratch Programming Language?

Scratch is an easy-to-use visual programming language that lets you create interactive stories and g...

The Ethics of Programming
The Ethics of Programming

Programming is a powerful tool that can be used for good or for bad. As programmers, we have a respo...

AdBlock Detected!

Our website is providing free tools to our users there is nothing
that you pay for. We only display advertisement ads. So Please
don’t use adBlocker, Keep visiting us thanks.