Java Help!

  HasH 15:02 17 Feb 03
Locked

Does anyone know the differances between instance variables and methods? Comparisons would be helpful too.

Thanx

  Elrond 15:26 17 Feb 03

Instance Variable = A variable that describes an attribute of an instance of a class instead of the class itself.

Method = A group of statements in a class that defines how the class's objects will behave.

  QuickHare 17:05 17 Feb 03

Instance Variable - A particular being of a class. A String class is a group of objects which are String. "Hello World" is a particular String. An instance variable is the same sort of thing.

Method - Something can be applied to an instance variable. myString.toUpper() is a method as it converts the string in myString to uppercase.



Different methods and variables appear in different types of objects.

This thread is now locked and can not be replied to.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

Prehistoric Britain is laid out in these Royal Mail stamp illustrations

Best running headphones | Best sport & fitness headphones: 4 brilliant pairs of wireless…