Java Help!

  [DELETED] 15:02 17 Feb 2003
Locked

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

Thanx

  [DELETED] 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.

  [DELETED] 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

Amazon Prime Day 2018: Best Deals & Launches

42 Tips for How to Make Digital Artworks That Look Hand-made

The best Amazon Prime Day Apple deals 2018

Les meilleures séries Amazon Prime Video (2018)