in a constructor what happen if u call super and this in
the same class? i know that it is not possible to call
both in the same one? if we call what will happen?

Answer Posted / agile being

The question clearly specifies "what happen if u _CALL_
super and this in the same class"

By call, probably, they mean:
this(); /*Invoking the constructor*/
super(); /*Invoking the parent class's constructor*/

I think the right answer is that it will raise a compiler
exception. Such a program will not compile.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between a constructor and a method? Can we mark constructors final?

671


What is string pooling concept?

551


When should the method invokelater() be used?

582


What are the different collection views provided by maps?

563


What types of index data structures can you have in java?

612






What is the synonym of framework?

555


Is an empty arraylist null?

591


Explain how can you debug the Java code?

586


Explain about the main() method in java?

565


What is boolean example?

525


What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

621


Are variables stored in ram?

553


What is the method to declare member of a class static?

534


What are the characteristics of Final,Finally and Finalize keywords.

699


What is a platform?

538