Home Discussion Discuss: Example of static method

  • javavishnuvardhanreddy April 17, 2011 at 9:58 PM

    super class static method is over writing in the sub class is possible or not?explain...

  • static methodsachin mishra June 17, 2011 at 3:22 PM

    thanks!!! it's very clear and easy defination to learn.

  • Clear AnswerManoharan July 10, 2011 at 9:24 PM

    i dont underStand Static. i want clear ans...

  • javaAnuradha Kariyawasam February 7, 2013 at 4:39 PM

    good

  • java languageshekhar December 4, 2011 at 5:29 PM

    why use static keeyword in java

  • StaticNagaraju Kaveti March 4, 2012 at 8:08 PM

    simple explanation is very will,good thinking. thanks.

  • static and instance santosh April 30, 2012 at 11:20 AM

    what happens when a static method calls a static method with respect to object name if those two static methods are in same class..? what happens when a non-static method calls a static method directly(if those two static and non-static methods are in same class..)..?

  • StaticMethodBhupesh Sharma June 15, 2012 at 12:46 AM

    i don't see any use of these variables : i=100; j=1000; it's just that you have to declare a variable static if you want to use that variable in the static method. it might be confusing if you see the code of this particular Example.

  • commentsdhananjay singh shrinet July 10, 2012 at 3:16 PM

    nicely explained.....

  • Pls Explin this programme Out put.!!!!!!Satish July 12, 2012 at 4:21 PM

    class Csm { public static void doIt() { System.out.println("Am IN doIt();"); } } class StaticMethodDemo { public static void main(String ar[]) { Csm obj1=new Csm(); obj1.doIt(); Csm.doIt(); obj1=null; obj1.doIt(); } } /*OUT PUT: D:\java>javac StaticMethodDemo.java D:\java>java StaticMethodDemo aM IN doIt(); aM IN doIt(); aM IN doIt(); */

  • Static method and variable...vinay kumar sharma August 22, 2012 at 12:52 PM

    static { int x=90; } then what is the type of x variable..is it of type instance variable or class vaiable or any other variable..

  • thanksmircl September 7, 2012 at 1:23 AM

    Thank you :=)

  • javachinna September 22, 2012 at 11:32 PM

    why static variables are not accessed nonstatic

  • hiali August 19, 2013 at 1:15 PM

    why use static keyword in java

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Java Beginners

STATIC
BETWEEN STATIC BLOCK AND STATIC METHOD?   A STATIC block is automatically... between static block and static method: static block will execute when ever... is an example: public class StaticTest { static{ System.out.println("Hello from 

Java Beginners

Static
Static  Can i know the real time example for Static method and final variables with defenition? Thank you 

Java Beginners

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 and accessed each time an instance of a class, an object, is created. When static 

Java Beginners

Static method
Static method  what is a static method?   Have a look at the following link: Java Static Method 

Java Beginners

static method
static method  Give some absolute examples and definition for static method also 

Java Beginners

Static Method in Java
Static Method in Java  Is Overriding Static methods possible in java? If Yes, How 

Java Interview Questions

how to call static method
how to call static method  class A { //some code } class B extends class A { static method() } class C { } //how to access static method() from B to C 

Java Interview Questions

how to call static method
how to call static method  class A { //some code } class B extends class A { static method() } class C { } //how to access static method() from B to C 

Java Interview Questions

how to call static method
how to call static method  class A { //some code } class B extends class A { static method() } class C { } //how to access static method() from B to C 

Java Interview Questions

how to call static method
how to call static method  class A { //some code } class B extends A { static method() } class C { } //how to access static method() from B to C 

Java Interview Questions

how to call static method
how to call static method  class A { //some code } class B extends A { static method() } class C { } //how to access static method() from B to C 

Java Interview Questions

how to call static method
how to call static method  class A { //some code } class B extends A { static method() } class C { } //how to access static method() from B to C 

PHP Questions

Static Method in PHP - PHP
Static Method in PHP  So far I can easily use the normal functions as variable in PHP? but how can use static method?  Hi Friend, Please...-static-variable-method.html Thanks 

Java Interview Questions

Java static method
Java static method  Can we override static methods 

Programming Tutorials

Java static method example
Description: Static variable are used within the static method. Non static variable do not exits in the static method. Static variables are shared by its class instances. Static variable can be used without using the instances 

Java Beginners

When will you define a method as static?
When will you define a method as static?  Hi, When will you define a method as static? thanks 

Java Beginners

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 

Java Beginners

Static method in java - Java Beginners
Static method in java  What are static method in Java  Hi Friend, Please visit the following link: http://www.roseindia.net/java/beginners/howtoaccessstaticmethod.shtml Hope that it will be helpful for you 

Java Tips and Examples

Example of static method
Example of static method       This Java programming example will teach you the way to define a static... a static method and when not to use. If you have a better understanding 

Java Beginners

Why is the main method declared static?
Why is the main method declared static?  Hi, Why is the main method declared static? thanks   Hi, When we declare main() method in any... the static method. For more visit http://www.roseindia.net/java/beginners 

Core Java

Static
an instance of a class. Static methods are implicitly final method, since overriding..., rather than attaching to an object. A static method of a subclass can shadow a static method of the superclass, regarding the original method was not declared 

Java Beginners

What are the restriction imposed on a static method or a static block of code?
What are the restriction imposed on a static method or a static block of code?  hi, What are the restriction imposed on a static method or a static block of code? Thanks 

Java Beginners

static keyword
and doesn√Ę‚?¨‚?Ęt need any object. Static Methods Static method is the method which belongs to the class and not to the object(instance). 1)A static method can access only static data. It can not access non-static data (instance 

Java Beginners

static functions
object. Static Methods Static method is the method which belongs to the class and not to the object(instance). 1)A static method can access only static data. It can not access non-static data (instance variables). 2)A static method can 

Java Beginners

Static Variable
Static Variable  What is the basic use of introducing static variable type in java?Please explain clearly....   The Static means... of a class, an object, is created. When static is applied to member variables 

Java Beginners

can we inherit static method in java?
can we inherit static method in java?  can we inherit static method in java 

Java Beginners

Can we declare a static variable inside a method?
Can we declare a static variable inside a method?   Hi, Can we declare a static variable inside a method? thanks 

PHP Tutorial

PHP set static Method
return the object. PHP Set Static Method Example: <?php class A { public..._set_static()Method in PHP : In this tutorial we will study how to assign...() method. We need to declare a magic method called __set_static() which 

Java Beginners

Static keyword in public static void main
: static keyword indicates that this method can be invoked simply by using the name... example for this?   The static variable is declared by using static keyword. Following is an example of static declaration: static int i=10 

Java Beginners

STATIC VARIABLE DECLARATION
STATIC VARIABLE DECLARATION  why cannot the static variable declare inside the method 

DMCA.com