Category: MCQ-Java

This sections contains mcq – java multiple choice questions with answers and explanation on various topics in java that are asked in job interviews and written interview

MCQ Java Interfaces

Q) Which keyword is used to declare an interface in java? class interface implements abstract     Q) A java interface can contain ———— public static Final Variables only public Abstract methods Abstract methods(unimplemented) and implemented methods both public static Final Variables and abstract methods both   Q) Which is the correct way to inherit…

Read the full article

MCQ – Java oops concept

Q) Java object oriented programming concepts is/are Encapsulation Inheritance polymorphism All of the above.   Q) Java does not support _______________? Inheritance Multiple inheritance for classes multiple inheritance of interfaces compile time polymorphism Q) Runtime polymorphism feature in java is method overriding method overloading constructor overloading operator overloading Q) Encapsulation concept in java is Hiding…

Read the full article

MCQ on Java keywords

Q) Final keyword in java is used with class class fields class methods All of the above   Q) False statement about final method in java Value of final variable cannot be changed once initialized. Final method is inherited but we cannot override it If you make a class final then you cannot extend the…

Read the full article

MCQs – Java Inheritance

Q) Which inheritance in java programming is not supported Multiple inheritance using classes Multiple inheritance using interfaces Multilevel inheritance Single inheritance   Q) What is subclass in java? A subclass is a class that extends another class A subclass is a class declared inside a class Both above. None of the above. Q) If class…

Read the full article

MCQ- Java thread

MCQ- Java multithreading multiple choice questions with answers and explanation. 50% of the MCQ on multithreading in java are asked in interviews. But, additional objective questions have been added to cover java thread concept.   Q) In java multi-threading, a thread can be created by Extending Thread class Implementing Runnable interface Using both None Q) Which method…

Read the full article