| Author |
Static in java
|
kumar mdu
Ranch Hand
Joined: Jan 04, 2011
Posts: 59
|
|
What is static in java?
What is static class., static method., static variable and static block?
could anyone explain me detaily?
thanks
|
 |
Sudipta Laha
Ranch Hand
Joined: Aug 23, 2010
Posts: 49
|
|
Please check the oracle java tutorials.
You will get a lot of links in google too..
|
Regards,
Sudipta Kumar Laha
|
 |
kumar mdu
Ranch Hand
Joined: Jan 04, 2011
Posts: 59
|
|
I got lots of google links for static,
If anyone explain i'll understand well so only i ask
thanks for your reply.
|
 |
Pramod P Deore
Ranch Hand
Joined: Jul 15, 2008
Posts: 629
|
|
Actually static is a very big topic in java. You can ask specific thing in that you can't understand.
static variable: When a variable is declared with the static keyword, its called a class variable. All instances share the same copy of the variable.
static Method:When a method is declared static, it can be called/used without having to create a object first. Static Methods Cannot Access Non-Static Variables
static class: you instantiate the inner classes independently of the main enclosing class
|
Life is easy because we write the source code.....
|
 |
kumar mdu
Ranch Hand
Joined: Jan 04, 2011
Posts: 59
|
|
thank you
It helps me to google it more.
thanks.
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12921
|
|
Did you find the following page in Oracle's Java Tutorials?
It explains it in detail: Understanding Instance and Class Members
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: Static in java
|
|
|