Wrong Java quiz? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 47

Wrong Java quiz?

"Constructors and destructors can be overloaded." Screenshot: http://dl4.joxi.net/drive/2018/02/04/0022/3274/1473738/38/68adf2c34f.jpg Correct answer is yes. Why? Constructors can be overloaded - it's true. But what about destructors? First, Java doesn't have destructors. Second, Java has a finalize() method and it can be overloaded. But it's not a destructor. I'm just confused as well as my opponent. What do you think?

5th Feb 2018, 8:04 AM
Igor Makarsky
Igor Makarsky - avatar
9 Answers
+ 29
i have some more wrong quizzes /* question ::: what will this statement do ? System.Out.Println(" "); right answer ::: error but its showing that it will output space & a new line 😂 , i reported this atleast 5to6 times but this quiz keeps coming*/
5th Feb 2018, 10:33 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 17
I am not a Java dev but yeah I learn Java in school and yes, Java uses automatic garbage collection rather than manual destruction. Use your powers and forward this to the devs!
5th Feb 2018, 8:20 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 10
You can overload them. I have a coding assignment in Java and the constructors are indeed overloaded. My CS teacher can't be wrong ;)
5th Feb 2018, 8:25 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 9
I lost/drew a few challenges because of it. 😭 At one point, it led me to believe that there are destructors in Java, and SL course doesn't offer it 😸
5th Feb 2018, 8:24 AM
DAB
DAB - avatar
+ 6
How constructors can be overloaded when they are not inherited?
5th Feb 2018, 8:23 AM
Vaibhav Sharma
Vaibhav Sharma - avatar
+ 6
Sorry, my mistake I confused construcor overloading as constructor overriding
5th Feb 2018, 8:30 AM
Vaibhav Sharma
Vaibhav Sharma - avatar
+ 5
This is showing that the right answer is yes.
5th Feb 2018, 10:19 AM
Ritish Shrirao
Ritish Shrirao - avatar
+ 5
yes there is a syntax error, 'O' should be small, I have also got 2 incorrect questions , I reported it too, but still it keeps on coming
5th Feb 2018, 10:39 AM
Mr.Curious
Mr.Curious - avatar
+ 4
hey Gaurav can you help me to clear this doubt ? https://www.sololearn.com/Discuss/1047241/?ref=app
5th Feb 2018, 10:42 AM
Mr.Curious
Mr.Curious - avatar