whats the diffrence between an object and variables?
June 19, 2010 at 1:42 PM
A variable holds a single type of literal. i.e. 1, hello whereas an object is a instance of a class created by a programmer with a set of methods which preforms certain task depending what methods have been defined.
int i = 4; // i is the variable
Hello b = new Hello();// b is an object where Hello is a class