Java Help!

  HasH 15:02 17 Feb 2003
Locked

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

Thanx

  Elrond 15:26 17 Feb 2003

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 2003

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.

Elsewhere on IDG sites

Best Amazon Echo: What’s the best Alexa speaker?

Kano Computer Kit Complete review: A fun DIY 'laptop' that teaches kids to code

Best pro photo editors for Mac 2018

TV & streaming : comment regarder les Jeux olympiques d’hiver 2018 ?