Hi,
I just wanted to know about instance method? If static modifier is not applied before does it makes it an instance method ? Plz give an example
Thanku
priyanka_10
0
Newbie Poster
Recommended Answers
Jump to Postpublic class Bird { .... .... /*static method*/ public static void eat() { } /*instance method*/ public void fly() { } }
so inside your main
Bird myBird=new Bird(); /* call instance method */ myBird.fly(); /*call static method*/ Bird.eat();
see how instance …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.