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
Differentiate between a constructor and a method? Can we mark constructors final?
What is string pooling concept?
When should the method invokelater() be used?
What are the different collection views provided by maps?
What types of index data structures can you have in java?
What is the synonym of framework?
Is an empty arraylist null?
Explain how can you debug the Java code?
Explain about the main() method in java?
What is boolean example?
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
Are variables stored in ram?
What is the method to declare member of a class static?
What are the characteristics of Final,Finally and Finalize keywords.
What is a platform?