What is constructor and virtual function?

Answers were Sorted based on User's Feedback



What is constructor and virtual function?..

Answer / raj

constructor is special member function whose purpose to
initialize the class member variables.

Is This Answer Correct ?    10 Yes 0 No

What is constructor and virtual function?..

Answer / niranjanravi

Constructor is a special kind of method used to initialize
an object.

Is This Answer Correct ?    11 Yes 2 No

What is constructor and virtual function?..

Answer / lakshmi

Constructor is the function that has class name as its
function name with no return type and is used to initialize
the data members of the class.
virtual function is the function that can be overriden in
the derived class. it uses virtual keyword. it may or may
not be overloaded in derived class.
abstract function must be overridden in the derived class
inorder to create the instance.

Is This Answer Correct ?    4 Yes 0 No

What is constructor and virtual function?..

Answer / ravikiran(aptech mumbai)

constructor name is of the class name which has no return
type and is used o initialize during instantiation of class.

virtual function is the function called t runtime

Is This Answer Correct ?    3 Yes 2 No

What is constructor and virtual function?..

Answer / rohit saini

Contructor is the special type of method which is used
initialize the data member the class

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

Name the method of a Container that can be used to cause a container to be laid out and redisplayed?

1 Answers  


What is the difference between pageContext and page implicit objects in jsp?

9 Answers   Gspann Technologies, Merrill Lynch, Polaris,


Explain about global variables in Java?

3 Answers  


What is lexicographically smallest string?

0 Answers  


10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } } 10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } }

0 Answers  






java Technical questions asked by JPMC

0 Answers   JPMorgan Chase,


Why null interfaces are used in Java?

2 Answers  


What is the difference between compile-time polymorphism and runtime polymorphism?

0 Answers  


What is a nested structure?

0 Answers  


Why convert an applet to an application?

0 Answers  


Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods?

7 Answers   Ericsson,


What is parameter tag and what is its use?

1 Answers  


Categories