0

What is the purpose of (static) and (void)?

I'm new to java, guys please explain it to me.

25th Jan 2017, 1:33 PM
Darshana Herath
Darshana Herath - avatar
1 Odpowiedź
+ 1
void that means this method can not return any value. static means you no need any instance to load the method. For example main method is static because when JVM load the class no need any instances.
25th Jan 2017, 3:51 PM
Faruque Hossain
Faruque Hossain  - avatar