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
Which collections are thread safe in java?
Can a string be null?
What is the difference between char and char *?
What is the flag in java?
What is a protected class in java?
How many bytes is a string java?
Explain the init method?
Can we override static methods in java?
why Interface used?
What is meant by attribute?
Realized?
Can we have static methods in an interface?
Why does java does not support multiple inheritance? Explain
Why we override equals() method?
Can we create our own wrapper class in java?