File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Static in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Static in java" Watch "Static in java" New topic
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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Static in java
 
Similar Threads
Inner class and Methods
static and non static methods
what is the difference between static variable and static block
What is the use of static block
Static