Why do you use void in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at the International Criminal Court, Lives in The Hague, Netherlands.
The keyword static allows main( ) to be called without having to instantiate a particular instance of the class. This is necessary since main( ) is called by the Java interpreter before any objects are made. The keyword void simply tells the compiler that main( ) does not return a value.
2023-05-08 14:09:55
评论(499)
Helpful(122)
Helpful
Helpful(2)

Zoe Gray
QuesHub.com delivers expert answers and knowledge to you.
The keyword static allows main( ) to be called without having to instantiate a particular instance of the class. This is necessary since main( ) is called by the Java interpreter before any objects are made. The keyword void simply tells the compiler that main( ) does not return a value.