What is the difference between this() and super()?
Answer Posted / prabu.b
1)Super() always calling the constructor of immediate
super class, super() must always be the first statements
executed inside a subclass constructor.
2)You cannot use this() and Super() in the same constructor.
| Is This Answer Correct ? | 23 Yes | 4 No |
Post New Answer View All Answers
Is integer a class?
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (
What happens if main method is not static?
What is array initialization in java?
Where is the singleton class used?
Explain the difference between call by refrence and call by value?
What is a jagged array in java?
What is return data type?
What is the transient keyword?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
Program to Find the second largest element in an array.
What is a byte array?
What invokes a thread's run() method in java programming?
What do you understand by java?
Differentiate between postfix and prefix operators in java.