Java Programming Interview Questions and Answers - 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.
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.
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.
Which keyword is used to prevent overriding?
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
7000+ TNPSC Group 1, 2, 4, VAO Indian Economy Study Materials Pdf More
7000+ Gate Computer Science Engineering Previous Year Questions More
7000+ Fill in the Blanks with Suitable Homonyms More
7000+ Fill in the Blanks with Suitable Homophones More
Power Semiconductor Device and Integrated Circuits MCQ Questions Pdf More
1000+ Permutation and Combination Questions for CAT More
A-Z Computer Abbreviations Pdf More
One Word Substitution Questions for Bank PO, SO, Clerk Exams More
Mysql Backup and Restore Interview Questions and Answers More
1000+ General English MCQS for Competitive Exams More