+ 1

Does constructor return any value?

I meet this question in the challenge of Java;The answer is yes;but I don't think so;what do you think.

20th Jul 2018, 4:46 AM
wentao
wentao - avatar
2 ответов
0
constructor doesn't returns any value but it has return statement without any value class A{ A(){ return; } }
20th Jul 2018, 5:40 AM
ARNAB KUMAR DAS
ARNAB KUMAR DAS - avatar
0
mo bai da lao
21st Jul 2018, 1:46 AM
Java自学小白
Java自学小白 - avatar