| Author |
when to use of static class ?
|
Ayan Dutta
Ranch Hand
Joined: Oct 16, 2005
Posts: 94
|
|
Hi, can anybody tell me the proper use of a static class .what can be the advantage ? first of all when it is required ? can anybody give me some real lif examples or use of it in Java Source cose itself ? Regards, Ayan
|
 |
Garrett Rowe
Ranch Hand
Joined: Jan 17, 2006
Posts: 1295
|
|
|
What do you mean by static class? What do you think the static keyword means?
|
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
|
 |
Mike Cole
Ranch Hand
Joined: Sep 25, 2006
Posts: 38
|
|
I dont know what a static class is. Maybe you mean static functions and members? If you have a function that does not to keep track of own internal variables and gets everything that it needs to fullfill the request via parameters then you can make it static... For such functions theres no need to make an object. (As far as i understand, so use this info with care )
|
 |
Jan Groth
Ranch Hand
Joined: Feb 03, 2004
Posts: 456
|
|
static classes are special inner classes. see here
|
 |
Jan Groth
Ranch Hand
Joined: Feb 03, 2004
Posts: 456
|
|
i leave the link to the above article, but i find the described technique (seperate debugging code from live code) really weired, unusual and not recommendable. :-) jan
|
 |
Ayan Dutta
Ranch Hand
Joined: Oct 16, 2005
Posts: 94
|
|
That's right, Jan . I was also going through that link and same thing came into my mind also Any other example ? Ayan
|
 |
 |
|
|
subject: when to use of static class ?
|
|
|