You are not logged in.

#1 2015-06-08 08:07:51

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

Java Beginner:

Question:
What is the difference between this() and super().

Option A):
this() constructor is invoked within a method of a class while super() constructor is used within the constructor of the sub class
Option B):
super() constructor is invoked within a method of a class while this() constructor is used within the constructor of the sub class
Option C):
this() constructor is invoked within a method of a class while super() constructor is used outside the constructor of the sub class
Option D):
this() constructor is invoked outside a method of a class while super() constructor is used within the constructor of the sub class

Correct Answer is Option A):
this() constructor is invoked within a method of a class while super() constructor is used within the constructor of the sub class


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-06-08 08:07:51

Advertisement
Ads By Google

Re: Java Beginner:



Board footer