What is the difference between this() and super()?
Answer Posted / gcttcs
Super should be used only in the sub classes and super() is
used to point methods of super class. where as this can be
used in both super & sub classes and this() used to point
methods in the class where it is called.
| Is This Answer Correct ? | 28 Yes | 6 No |
Post New Answer View All Answers
What is native method in java?
Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?
What happens if a constructor is declared private?
What is the benefit of abstract class?
what do you mean by java annotations?
Why spring singleton is not thread safe?
What happens if we don’t define serial version uid?
Is 9 a prime number?
Why Java is not pure Object Oriented language?
What is map and hashmap in java?
What is static keyword?
why Java does not support multiple inheritances?
Java is pass by value or pass by reference? Explain
How many bytes is a char in java?
What are the advantages and disadvantages of reference counting in garbage collection?