i am always use static keyword but don't know clearly what is main purpose of static keyword. can any define , this is use in java Display method in oop
-
class Display{ static void show(Animal c){ c.sound(); c.hair(); c.ears(); } }Yasir Hussain– Yasir Hussain2017-11-26 07:25:19 +00:00Commented Nov 26, 2017 at 7:25
-
what is work of static in this classYasir Hussain– Yasir Hussain2017-11-26 07:25:43 +00:00Commented Nov 26, 2017 at 7:25
-
Read up : docs.oracle.com/javase/tutorial/java/javaOO/classvars.htmljrook– jrook2017-11-26 07:26:08 +00:00Commented Nov 26, 2017 at 7:26
-
2You need to do some research on your own before asking a question here. There's countless online sources which explain what static is.apokryfos– apokryfos2017-11-26 07:42:52 +00:00Commented Nov 26, 2017 at 7:42
Add a comment
|