What is the difference between void and return data type in JAVA? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

What is the difference between void and return data type in JAVA?

Please explain in detail as I am failing to understand the concept of these data types.

8th Sep 2018, 3:40 AM
Prince Gupta
Prince Gupta - avatar
1 ответ
+ 2
These are return type of methods... void returns nothing whereas return can return primitive data types, arrays etc.. Go on SoloLearn lessons for more details
8th Sep 2018, 4:08 AM
Rishabh
Rishabh - avatar