Strange question in java playground | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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