Differentiate constructor and a method and how are it be
used?
Answer Posted / janet
Constructor will be automatically invoked when an object is
created whereas method has to be called explicitly.
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
How do we access static members in java?
Explain about anonymous inner classes ?
What is a stringbuilder?
What is the purpose of encapsulation?
How will you print number in reverse (descending) order in BST.
Outline the major features of java.
Can extern variables be initialized?
What is the use of join method?
If a class is declared without any access modifiers, where can the class be accessed?
Which class is the superclass for all the classes?
What is enhanced loop in java?
What is keyword and identifier?
Can a static class have a constructor?
What is volatile data type?
What are encapsulation, inheritance and polymorphism?