Sei sulla pagina 1di 4

visit @ http://www.infotechcomputer.

in
“Jh x.ks'kk; ue%“

‘Java Form Design Questions’

Q. What is a class ?

Ans. A class is a blueprint that represents a set of similar objects.

Q. What is a on object ?

Ans. instance of a class is called an object.

Q. What is inheritance ?

Ans. the concept where the characterstics of a class are reused in an another class is called
inheritance.

Q. What is a constructor?

Ans. a function having the same name as of the class is called a constructor. it is invoked
automatically while creating object of the class

Q. What is method overloading?

Ans. a class having multiple functions with same name but different signatures is called method
overloading. it is also called as function overloading.

INFOTECH Computer Education, Kishangarh (Raj)  9829171122 Page 1


visit @ http://www.infotechcomputer.in

Q. What is method overriding?

Ans. the concept in which multiple classes have functions with the same name and same
signatures is called method overriding.

Q. What is a method?

Ans. a method is a subroutine or a part of program created to perform a specific function. a


method can be called any number of times and hence represents the concept of reusability.

Q. What do u understand with public and private ?

Ans. both are access modifiers - public means accessible anywhere in the program and private
means accessible only within the block in which it is declared.

Q. What are the types of inheritance?

Ans. there are five types of inehritance

a. single inheritance b. multilevel inheritance

c. hierarchical inheritance d. multiple inheritance

e. hybrid inheritance

Q. What type of inheritance supported by java

Ans. java supports only three types of inheritance

a. single inheritance b. multilevel inheritance

c. hierarchical inheritance

INFOTECH Computer Education, Kishangarh (Raj)  9829171122 Page 2


visit @ http://www.infotechcomputer.in
Q. What is an interface ?

Ans. a concept which is used to implement multiple inheritance in java.

Q. Java supports multiple inheritance or not ?

Ans. no java does not support multiple inheritance. we have to use interfaces for this purpose.

Q What is a base class?

Ans. it is a synonym of parent class which is inherited by another sub class.

Q. What is a sub class ?

Ans. a sub class is synonym of child class which inherits an another super class.

Q. What is an abstract class ?

Ans. a class whose object can't be created is abstract class. it only provides framework to other
classes.

Q. What is an abstract method ?

a method which does not have its body is abstract method. it is necessary to override an
abstract method.

Q. What is a final variable ?

Ans. Value of final variable can't be changed

Q. What is a final method ?

Ans. A method which can't be overridden is called final method

INFOTECH Computer Education, Kishangarh (Raj)  9829171122 Page 3


visit @ http://www.infotechcomputer.in

Q. What is a final class ?

Ans. A class which is can't be inherited is called final class

Q. What is abstraction

Ans. it is also called as data hiding. it is an importnat object oriented feature that hides the
complex implementation details of an object

Q. What is encapsulation?

Ans. Encapsulation is defined as wrapping up of data and information under a single unit.

Q. What is polymorphism?

Ans. Polymorphism is the ability of an object to take on many forms.

INFOTECH Computer Education, Kishangarh (Raj)  9829171122 Page 4

Potrebbero piacerti anche