0 votes
in JAVA by
Which one of the following cannot be used with the virtual keyword?

(i) Constructor

(ii) Destructor

(iii) Member function

(iv) None of the above

1 Answer

0 votes
by

(i) Constructor

A constructor in C++ is a special method that is used to initialize objects. The constructor is called when an object of a class is created. It can be used to set initial values for object attributes:

Related questions

0 votes
asked Apr 9, 2021 in JAVA by Robindeniel
0 votes
asked Feb 2, 2021 in JAVA by SakshiSharma
...