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 / raja
It Works fine with out any Exceptions,because in java each
and every class is inherited from the object class indirectly...
public class consex
{
public consex(String a)
{
super();
System.out.println(a);
}
public static void main(String dd[])
{
consex c=new consex("raja");
}
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Why java uses the concept of the string literal?
how come we know the object is no more used in the class?
List down the methods and interfaces of collection class in java.
What value is a variable of the string type automatically initialized?
How do you add an arraylist to an array in java?
How do you use equal in java?
Can a string be null?
What is the use of singleton class?
Explain importance of inheritance in java?
Which methods cannot be overridden in java?
What is an example of a constant variable?
Can a lock be acquired on a class in java programming?
What are the differences between Java 1.0 and Java 2.0?
What are methods in java?
Does java list allow null?