Java Programming Interview Questions and Answers - 1
Question: 1
What is difference between object oriented programming language and object based programming language?
Object based programming languages follow the features of OOPs except Inheritance.
Examples of object based programming languages are JavaScript, VBScript etc.
Question: 2
What is static in java?
Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class.
Static methods are implicitly final, because overriding is done based on the type of the object and static methods are attached to a class, not an object.
A static method in a superclass can be shadowed by another static method in a sub class, as long as the original method was not declared final.
However, you can’t override a static method with a non static method. In other words, you can’t change a static method into an instance method of a subclass.
Question: 3
What is abstract class?
A abstract class must be extended/sub classed (to be useful). It serves as a template.
A class that is abstract may not be instantiated, abstract class may contain static data.
Any class with an abstract method is automatically abstract itself and must be declared as such.
A class may be declared abstract even if it has no abstract methods. This prevents it from being instantiated.
Question: 4
Which keyword is used to prevent overriding?
Final
Question: 5
What is the purpose of the system class?
The purpose of the System class is to provide access to system resources.
- Java Interview Questions and Answers
- Top 1000+ Java Interview Questions and Answers Pdf
- Top 500+ Advanced Java Interview Questions 2020-2021
- Java Interview Questions and Answers for Freshers Pdf
- Java Interview Questions and Answers for Experienced Pdf
- Java Programming Basics Interview Questions
- Java OOPS Interview Questions for 3 years experienced
- Basic Java Programs Asked in Interview with Answers Pdf
- Java Programming Interview Questions and Answers
- C | C++ | Java Interview Questions and Answers
Gross Domestic Product and Its Growth Class 10 Questions Pdf More
Industrial Cluster in Tamil Nadu TNPSC Questions Pdf More
Food and Security TNPSC Questions Pdf More
Economics Food Security and Nutrition Class 10 Questions Pdf More
Class 10th Social Indian Constitution Pdf More
Chemistry NEET MCQ Questions and Answers More
Top 1000+ Puzzles Aptitude Questions and Answers More
1000+ Abyssinia Bank Aptitude Test Questions and Answers Pdf More
Synonyms and Antonyms Worksheet Pdf More
1000+ Multiple Choice Questions on Electric Traction Pdf More