1,105,556 Community Members

get my conecpts right , please !

Member Avatar
Ron2794
Newbie Poster
16 posts since Jan 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

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;
i=9;
/*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

Member Avatar
masijade
Industrious Poster
4,165 posts since Feb 2006
Reputation Points: 1,351 [?]
Q&As Helped to Solve: 510 [?]
Skill Endorsements: 22 [?]
Team Colleague
Featured
 
0
 

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

Member Avatar
Ron2794
Newbie Poster
16 posts since Jan 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
masijade
Industrious Poster
4,165 posts since Feb 2006
Reputation Points: 1,351 [?]
Q&As Helped to Solve: 510 [?]
Skill Endorsements: 22 [?]
Team Colleague
Featured
 
1
 

No? Which site did you accidentally log into and post this question?

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article