Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Harley Evans   on Apr 23 In Java Category.

  
Question Answered By: Rochelle Elliott   on Apr 23

instance method:
String s = new String("Good");
char c = s.charAt(2);

static:
String.toValue(4);

The difference is that you need to create an object of a class  frist
before you can call  an instace method  of it.\then you need to call
the objects instance  methos, as described above. Static methods  you
don't need to do this. Instead of saying <class>.<method>() it is
<object handle>.<method>()

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on instance methods Or get search suggestion and latest updates.


Tagged: