Nested Classes
1-What are the differences between static and non-static nested classes ?
2-Where a nested class could be non-static/static ? in what condition ?
3-Why a non-static nested class can't have static members ?
Printable View
Nested Classes
1-What are the differences between static and non-static nested classes ?
2-Where a nested class could be non-static/static ? in what condition ?
3-Why a non-static nested class can't have static members ?
Please at least attempt to show some effort here. What do you think the answers should be and why?
To forum members: note that this has been cross-posted on many forums, that in the Sun forums this user has posted other homework questions, has never shown his own work, has never thanked posters who have helped him.
what do you mean by showing some effort ? i didn't get that , if you mean i myself didn't search about them you are wrong i did that for #1 but i didn't get my answer completely and for #2,3 i had no idea about them and i asked others for help because that's what people do when they don't know s.th .
I myself do search about my questions and also ask others for help ,is that wrong ?
You are right i should have thanked who've helped me , i just did that and hope they forgive me .
I try not to post a cross-post again .
Just curious???
Why do you ask these kinds of questions?
They are like the kind you would ask if you were taking a test or doing homework.
They don't look like the questions a programmer would ask.
Someone trying to learn programming would have a problem with a program and they would post their code with questions.
Because , i don't know how to explain , i want to learn the logic of java and i think by learning that i could write my codes better .For writing a good code you should know how things work and behave . don't you think that when you learn logic of a program language well you will be good at it?
Well there is theoretical knowledge and there is practical knowledge. A programmer should know both. Knowing theory doesn't always make a good programmer.
I did more research on the net and I think I found the answers,I attached it (Nested classes-00.zip) and hope it would be useful.
Good luck