why the following things cannot be :

1.why i cannot extend the non static variable from static method or something ?

2.why i cannot use a variable directly in the class as :

class abc{
int i=4;

class xyz extends abc{
int j=7;
/*this should be valid acc. to me bcz i think that when a class is extended then the
variable are also inherited and now the class xyz has i and j both accesible so it should be able to change the variable value also. */

3. How i can make such a program that would continously generate objects and keep on extending classes automatically and gets up all the memory of the system until the system crashes.

tell me also something more about these object concept tricks and tips...PLEZ

Please at least let people know that you are cross-posting.

i didn't do that intentionally, i don't know from where to delete the posts

This article has been dead for over six months. Start a new discussion instead.