Java: "Which operator is used for the destructor?" | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Java: "Which operator is used for the destructor?"

I saw this question in a Java challenge, I chose ~ for the answer. But does Java have destructor? How can I report a wrong question?

2nd Jul 2017, 5:34 AM
Bàng Tứ Cường
Bàng Tứ Cường - avatar
4 Answers
+ 8
the finalise() method may come close but i don't see it this is more of a c++ issue yes lol i think i know that question. i crossed out ~ as i knew it was c++ btw we should start a wrong challenge thread
2nd Jul 2017, 5:42 AM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar
+ 4
Yeah there is no operator for a deconstructor with Java. You can try simulating one, but that's about it.
2nd Jul 2017, 6:15 AM
Rrestoring faith
Rrestoring faith - avatar
+ 2
U can report Question : After u finish the challenge that have a question you want to report it. Press on it (the challenge) then vuew correct answer. The question u want to report it there is an i shape at the top. U can press on it & report the Question.
2nd Jul 2017, 7:43 AM
rabab mohamed
rabab mohamed - avatar
+ 1
@lolyman: maybe you can post a comment on my code and I can reply you there.
2nd Jul 2017, 11:48 AM
Bàng Tứ Cường
Bàng Tứ Cường - avatar