waht happens when a return type ,even void is specified for
a constructor?
Answer Posted / krishna kumar g.
Answer 2 is exactly correcr.I have done practiclly.No
compile time errors.
Code will run and executes sucessfully.But it treats as
method not as constructor.
Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is data type example?
Can we print null in java?
Can inner class extend any class?
What is sortedset in java?
What is the difference between a break statement and a continue statement?
Can subclass overriding method declare an exception if parent class method doesn't throw an exception?
Name few java 8 annotations ?
Can a constructor be protected?
what is ststic with example
Add a value x to array from index l to r where 0 <= l <= r <= n-1
What is encapsulation in java?
What is a ?
Which is better list or arraylist in java?
Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?
What is treeset and treemap in java?