+ 1

why static method doesn't require object to invoke it? what happens if we call that by object( back end process)??

25th Sep 2016, 12:21 PM
riyas
2 ответов
+ 2
static methods are allocated with memory as soon as the Java program is loaded onto JVM. So it does not need a object to invoke it ,and it does not come under the memory allocated for an object .
25th Sep 2016, 4:58 PM
Nantha kumar .R
Nantha kumar .R - avatar
0
if we call that by object it will work but it will leave a yellow bulb there meaning its not a good practice
21st Oct 2016, 6:51 PM
Awais Abbas
Awais Abbas - avatar