0

What is the difference between a method starting with static and one without static like:

public void hello() and static void hello()

31st Jan 2017, 12:33 PM
Srijit Nair
Srijit Nair - avatar
1 Answer
+ 1
To use a non-static method, you have to instantiate the class it's in (i.e. make an object of the class). If it's static, instantiation isn't necessary.
31st Jan 2017, 12:41 PM
DaemonThread
DaemonThread - avatar