• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 1 out of 4 pages
Exam (elaborations)

Entry-level Java Programming Interview Questions and Answers Fully Solved Graded A+

Document preview thumbnail
Preview 1 out of 4 pages

Entry-level Java Programming Interview Questions and Answers Fully Solved Graded A+ What are the main features of Java? - Answers 1. Object-oriented 2. Simple 3. Platform Independent 4. Secured 5. Robust 6. Portable 7. Multithreaded 8. Distributed What are the fundamental principles of OOP? - Answers 1. Inheritance 2. Abstraction 3. Polymorphism 4. Encapsulation What is Inheritance in Java? - Answers Inheritance is one of the key principles of OOP. Through Inheritance, one class can inherit the properties of another class. The class from which properties are inherited is called a "super" class and the class to which properties are inherited is called a sub class. What is Constructor Overloading and its use? - Answers A class can have any number of constructors. These constructors will have different lists of arguments. It is called constructor overloading. Constructor overloading provides different ways to instantiate a class. What is polymorphism in Java? - Answers Polymorphism refers to any entity whether it is a method, constructor or an operator which takes many forms or can be used for multiple tasks. What is method overloading in Java? - Answers When a class has more than one method with the same name but with different lists of arguments. What is method overriding? - Answers When a super class method is modified in the sub class then it is called method overriding. Does Java support multiple inheritance? - Answers Java supports multiple inheritance only through interfaces. That means a class can implement more than one interface but can not extend more than one class. What is the difference between a constructor and a method? - Answers A constructor is a special member of a class which is used to create the objects of the class. It is special because it will have the same name as the class and will have no return type. A method, however, is an ordinary member of a class which is used to implement some behavior of a class. It will have its own name and return type. Can we overload the main() method? - Answers Yes, we can overload a main() method. A class can have any number of main() methods, but, one of these must be in the form "public static void main(String[] args)" in order to start the execution. How are exceptions handled in Java? - Answers Java has its own mechanism to handle the exceptions. In Java, exceptions are handled using three blocks - Try, Catch, and Finally blocks. Try - The code to be monitored for exceptions will be kept in this block. Catch - If any exceptions occurred in try block, those exceptions must be caught in this block. Finally - This block will always be executed. What are PATH and CLASSPATH? - Answers PATH and CLASSPATH are two environment variables which need to be set in order to compile and run the Java programs. What is the difference between error and exception in Java? - Answers FILL IN LATER What are the differences between static and non-static methods? - Answers Static methods are common to all instances of a class and are stored in the class memory whereas non-static methods are stored in the object memory. Each instance of a class will have their own copy of non-static methods. What are the differences between method overloading and method overriding? - Answers FILL IN LATER What are the different ways of creating threads in Java? - Answers There are 2 ways to create the threads in Java: 1. Extending .Thread class 2. Implementing .Runnable interface

Content preview

Entry-level Java Programming Interview Questions and Answers Fully Solved Graded A+

What are the main features of Java? - Answers 1. Object-oriented

2. Simple

3. Platform Independent

4. Secured

5. Robust

6. Portable

7. Multithreaded

8. Distributed

What are the fundamental principles of OOP? - Answers 1. Inheritance

2. Abstraction

3. Polymorphism

4. Encapsulation

What is Inheritance in Java? - Answers Inheritance is one of the key principles of OOP. Through
Inheritance, one class can inherit the properties of another class. The class from which properties are
inherited is called a "super" class and the class to which properties are inherited is called a sub class.

What is Constructor Overloading and its use? - Answers A class can have any number of constructors.
These constructors will have different lists of arguments. It is called constructor overloading.
Constructor overloading provides different ways to instantiate a class.

What is polymorphism in Java? - Answers Polymorphism refers to any entity whether it is a method,
constructor or an operator which takes many forms or can be used for multiple tasks.

What is method overloading in Java? - Answers When a class has more than one method with the same
name but with different lists of arguments.

What is method overriding? - Answers When a super class method is modified in the sub class then it is
called method overriding.

Does Java support multiple inheritance? - Answers Java supports multiple inheritance only through
interfaces. That means a class can implement more than one interface but can not extend more than
one class.

Document information

Uploaded on
May 13, 2025
Number of pages
4
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TutorJosh
3.5
(76)
Sold
504
Followers
16
Items
32988
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions