Return type | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Return type

The void printSomething. Is it compulsory to use printSomething after the void

27th Apr 2018, 11:58 AM
winchester ernest amankwaa
winchester ernest amankwaa - avatar
4 Answers
+ 6
It is just a name to the function. You can put any name on that place. It is just the function name
27th Apr 2018, 12:04 PM
Akash Pal
Akash Pal - avatar
+ 4
It's your choice to name a function...but be sure to define it.
27th Apr 2018, 12:05 PM
Mayank Rampuriya
Mayank Rampuriya - avatar
+ 2
nah, its just naming function. Name your function whatever you wish. You might wanna go back to your functions lesson. Revise a bit.
27th Apr 2018, 12:02 PM
Akib
Akib - avatar
+ 1
no..void is just a return type to use before main...its not complusary...u may use any other data type instead of it..u may revise about data types once
27th Apr 2018, 1:13 PM
manasa yanaki
manasa yanaki - avatar