What is that static and void required for ..can't we run with simple static or with void? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

What is that static and void required for ..can't we run with simple static or with void?

24th Jul 2016, 9:24 AM
Suneeth
Suneeth - avatar
1 Resposta
0
Static means that the method (or vatible or inner class) has nothing to do with an instance,so its not object related. void means that theres no return type so the public static void main (... is independet has no return type and you don't have to create an object to use it. and of course its the method to start every java programme
26th Jul 2016, 3:21 PM
No One
No One - avatar