Strange question in java playground | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Strange question in java playground

I met this question many times here. Please help me to understand it. What the heck does it mean? “Class constructor returns 1, if an object has successfully created and 0, when something went wrong.” And the correct answer is “False” All punctuation are original.

1st Oct 2019, 9:05 PM
Alex Romanenko
Alex Romanenko - avatar
3 Answers
+ 1
I haven't come across whether or not constructors return a value if the object was created successfully, if the correct answer is "false" then java might not deal with errors this way.
1st Oct 2019, 9:37 PM
D_Stark
D_Stark - avatar
+ 1
Constructor in java doesn't return anything. It's purpose is only to create object
3rd Oct 2019, 10:46 AM
Odiesta Shandikarona
Odiesta Shandikarona - avatar
0
Oh, after your sentence i’ve get an idea of this question. Thank u. Am i right that questuon is bad way formulated or it’s just my poor english?
4th Oct 2019, 8:20 PM
Alex Romanenko
Alex Romanenko - avatar