static in java

static in java

what is the need to go static? what use?

View Answers

April 9, 2013 at 12:45 PM

Hi,

In Java term Static means one per class, not one for each object no matter how many instance of a class might exist. A static method in a superclass can be shadowed by another static method is a subclass, as long as the original method was not declared final. I have find a resourceful reference link for What is Static in Java?


June 5, 2012 at 9:06 PM

if you declare a method static then u donot have to create a object of class to call it . u can directly call it by new classname.methodname(); other wise u have to create a object for it.

Ads









Related Tutorials/Questions & Answers:
static in java
static in java  what is the need to go static? what use
Static & Instance variables in java
Static & Instance variables in java  What are the Difference between Static & Instance variables in java
Advertisements
Static Method in Java
Static Method in Java  Is Overriding Static methods possible in java? If Yes, How
static
static  what r the main uses of static in java   Hi Friend, The Static means that a certain object/variable is resident in memory... the following link: http://www.roseindia.net/help/java/s/static-java-keyword.shtml
static
is why if you declare the function main as static then java does not have...Static Concept  in what are all the situation we may use static...,then use static blocks and without creation of object we need to perform some task
static
static  What is the exact need of declaring a variable as static?   A static variable is a variable who's single copy in memory is shared by all objects,so any modifications to the static variable will modify it's value
static keyword in java
.style1 { color: #0000FF; } static keyword in java We are going to discuss about static keyword in java. The static keyword is a special keyword in java programming language. A static member belongs to a class
STATIC
STATIC  WHAT IS STATIC BLOCK?EXPLAIN , AND WHAT IS THE DIFFERENCE BETWEEN STATIC BLOCK AND STATIC METHOD?   A STATIC block is automatically... between static block and static method: static block will execute when ever
Static Method in java with realtime Example
Static Method in java with realtime Example  could you please make me clear with Static Method in java with real-time Example
Static
Static  Can i know the real time example for Static method and final variables with defenition? Thank you
static Java Keyword
static Java Keyword       The static is a keyword defined in the java programming language. Keywords... in java programming language likewise the static keyword indicates the following
static
redeclare static variable in the inherited class  can we redeclare static variable in the inherited class like this: public class StaticClass1 { class StaticClass1{ static int noOfInstances; StaticClass1
Static variable in java
Static variable in java. Static is a keyword in java used to create static methods, variable inside a class and static class. Static variable is also called class variable which belongs to class not to object. Static
can we inherit static method in java?
can we inherit static method in java?  can we inherit static method in java
Why doesn't Java allow overriding of static methods?
Why doesn't Java allow overriding of static methods?  Why doesn't Java allow overriding of static methods
Java inner class and static nested class
Java inner class and static nested class  Java inner class and static nested class
JAVA what is different between static block and public static void main(String a[]) method
JAVA what is different between static block and public static void main(String a[]) method  what is different between static block and public static void main(String a[]) method,we execute method without main method(by static
Static method
Static method  what is a static method?   Have a look at the following link: Java Static Method
Accessing non-static members through the main method in Java.
Accessing non-static members through the main method in Java.  As an oop rule, a static method can have access only to static variables and static... in Java has access to non-static members (variables or methods) even though
static functions
. For more information, visit the following links: Java Static Variables Java Instance Variables Java Static Method   Static Variables Static variables..., visit the following links: Java Static Variables Java Instance Variables
static keyword
static keyword  Hii, In which portion of memory static variables stored in java. Is it take memory at compile time? thanks deepak mishra
Static Variable
Static Variable  What is the basic use of introducing static variable type in java?Please explain clearly....   The Static means...://www.roseindia.net/help/java/s/static-java-keyword.shtml
Static
/struts/struts2/strutsresources/static-parameter.shtml http://www.roseindia.net/java... Static       Static... an instance of a class. Static methods are implicitly final method, since overriding
static methods
static methods  why static methods cannot read or write the instance variables
static method
static method  Give some absolute examples and definition for static method also
static keyword
static keyword  please give some detail about Static keyword.   Static Variables Static variables are class variables that are shared... and not to object(instance). 2)Static variables are initialized only once , at the start
Maven dependency for net.n2oapp.context - static-context version 7.12.3 is released. Learn to use static-context version 7.12.3 in Maven based Java projects
to use  net.n2oapp.context - static-context version 7.12.3 in Java projects... and includes  net.n2oapp.context - static-context version 7.12.3 java library...Maven dependency for  net.n2oapp.context  - Version 7.12.3 of static
Maven dependency for net.n2oapp.context - static-context version 7.12.4 is released. Learn to use static-context version 7.12.4 in Maven based Java projects
to use  net.n2oapp.context - static-context version 7.12.4 in Java projects... and includes  net.n2oapp.context - static-context version 7.12.4 java library...Maven dependency for  net.n2oapp.context  - Version 7.12.4 of static
Maven dependency for net.n2oapp.context - static-context version 7.12.6 is released. Learn to use static-context version 7.12.6 in Maven based Java projects
to use  net.n2oapp.context - static-context version 7.12.6 in Java projects... and includes  net.n2oapp.context - static-context version 7.12.6 java library...Maven dependency for  net.n2oapp.context  - Version 7.12.6 of static
Maven dependency for net.n2oapp.context - static-context version 7.12.7 is released. Learn to use static-context version 7.12.7 in Maven based Java projects
to use  net.n2oapp.context - static-context version 7.12.7 in Java projects... and includes  net.n2oapp.context - static-context version 7.12.7 java library...Maven dependency for  net.n2oapp.context  - Version 7.12.7 of static
Maven dependency for net.n2oapp.context - static-context version 7.12.9 is released. Learn to use static-context version 7.12.9 in Maven based Java projects
to use  net.n2oapp.context - static-context version 7.12.9 in Java projects... and includes  net.n2oapp.context - static-context version 7.12.9 java library...Maven dependency for  net.n2oapp.context  - Version 7.12.9 of static

Ads