31. What is JDBC?

JDBC is a Java API that is used to connect and execute query to the database. JDBC API uses jdbc drivers to connects to the database.

32. What is difference between abstract class and interface?

33. What is difference between throw and throws?

34. What is difference between wait() and sleep() method?

35. What is the difference between HashMap and Hashtable?

36. What is the difference between array and arraylist?

37. What is a class?

A class is simply a representation of a type of object. It is the blueprint/ plan/ template that describes the details of an object.

38. What is an object?

An object is an instance of a class. It has its own state, behavior, and identity.

39. What is Encapsulation?

Encapsulation is an attribute of an object, and it contains all data which is hidden. That hidden data can be restricted to the members of that class.

Levels are Public, Protected, Private, Internal and Protected Internal.

40. What is Polymorphism?

Polymorphism is nothing but assigning behavior or value in a subclass to something that was already declared in the main class. Simply, polymorphism takes more than one form.

41. What is Inheritance?

Inheritance is a concept where one class shares the structure and behavior defined in another class. If inheritance applied on one class is called Single Inheritance, and if it depends on multiple classes, then it is called multiple Inheritance.

42. What is exception handling?

An exception is an event that occurs during the execution of a program. Exceptions can be of any type – Runtime exception, Error exceptions. Those exceptions are adequately handled through exception handling mechanism like try, catch and throw keywords

43. Difference between overloading and overriding?

Overloading is static binding whereas Overriding is dynamic binding. Overloading is nothing but the same method with different arguments, and it may or may not return the same value in the same class itself.

Overriding is the same method names with same arguments and return types associated with the class and its child class.

44. What are access modifiers?

Access modifiers determine the scope of the method or variables that can be accessed from other various objects or classes. There are 5 types of access modifiers, and they are as follows:
1. Private.
2. Protected.
3. Public.
4. Friend.
5. Protected Friend.

45. How many instances can be created for an abstract class?

Zero instances will be created for an abstract class.

Leave Comment

Your email address will not be published. Required fields are marked *

Looking for learning Framework Development from Scratch? Lookout for Detailed Framework Development videos on YouTube here -

Get the Framework code at Github Repo: