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

View Answers

April 18, 2011 at 10:38 AM

class A {
} 
class B extends A {
    static void method(){
        System.out.println("Static Method!");
    }
    }
    class C {
        public static void main(String[]args){
        B b=new B();
        b.method();
        }
    }









Related Tutorials/Questions & Answers:
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
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
Advertisements
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
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
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
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
How to call java method on Button click in jsp?
How to call java method on Button click in jsp?  How to call java method on Button click in jsp
How to call the run method from another class?
How to call the run method from another class?  Sorry, if this is a stupid question. I would like to find out how to call the run method...({}); The run method is declared in FereastraPrincipala.java and I want to call
Static method
Static method  what is a static method?   Have a look at the following link: Java Static Method
static method
static method  Give some absolute examples and definition for static method also
how to open one Jframe from main method call
how to open one Jframe from main method call  I have downloaded... || []).push({}); GameBoard.java And Engine.java have the main() method... five java classes in this project- Engine.java(containing main() method
Example of static method
cannot be referenced from a static context. Static method can call only other static... Example of static method      ... a static method and when not to use. If you have a better understanding
Static Method in Java
Static Method in Java  Is Overriding Static methods possible in java? If Yes, How
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 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 static method
Java static method  Can we override static methods
Why is the main method declared static?
Why is the main method declared static?  Hi, Why is the main method...[]. The motive of it is that static in JVM can call it directly without creating any instance for the java class, where we declared it. Any static java method can
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
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, (adsbygoogle = window.adsbygoogle || []).push
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
javascript call action class method instruts
javascript call action class method instruts  in struts2 onchange event call a method in Actionclass with selected value as parameter how can i do
Why servletcontainer can,t call the Init() method ?
Why servletcontainer can,t call the Init() method ?  Why servletcontainer can,t call the Init() method
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 (adsbygoogle = window.adsbygoogle || []).push
can we inherit static method in java?
can we inherit static method in java?  can we inherit static method in java
validte method call upon ActionForm creation.
validte method call upon ActionForm creation.  I want to know if validate method is called when ActionForm object is created?   Hi, The validate method is not called when ActionForm object is created.ADS_TO_REPLACE_1
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, (adsbygoogle = window.adsbygoogle || []).push
How to call servlet in JSP?
How to call servlet in JSP?  How to call servlet in JSP
PHP set static Method
_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... return the object. ADS_TO_REPLACE_1 PHP Set Static Method Example: <?php
how call ireports in jsp
how call ireports in jsp  please send me code any one for calling ireports in servlet-jsp program i am trying to call the ireports in servlet and jsp error is occurred exception: javax.servlet.ServletException
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 methods. If it is so, an obvious question arises as to how can the main() method
how to inherit static variable
how to inherit static variable   how to inherit static variable or methods in Java?? Please explain the entire process of inheriting the variable. Thanks in advance
Calling Static Methods Using SpEL
will see how to use static method random() of java.util.Math class to wire random...Calling Static Method Using SpEL Spring 3 provides powerful Expression... to demonstrate how SpEL is used to wire value by calling static  method
JAVA what is different between static block and public static void main(String a[]) method
void main(String a[]) method,we execute method without main method(by static...() method for various reasons, it coexists with main() method which is static too...JAVA what is different between static block and public static void main(String
how to call jsp from flex
how to call jsp from flex  hi, i want to know that how can i call a FLEX from JSP. . A good Example will be appreciated
STATIC
BETWEEN STATIC BLOCK AND STATIC METHOD?   A STATIC block is automatically... between static block and static method: (adsbygoogle..., it means this block executes first of all, where as static block have to call
how to call jsp from flex
how to call jsp from flex  Plz help me out to get JSP from FLEX.... I need your help.... Thanks for future
Call class methods
Call class methods       This Example shows you how to call class method in velocity...: Use put() method of Class VelocityContext through object 'ctx'. 4: Create
how formBackingObject() method will work.
how formBackingObject() method will work.  How the formBackingObject method will behave
Static
Static  Can i know the real time example for Static method and final variables with defenition? Thank you
how to call a frame having threading concept
how to call a frame having threading concept   i hav a frame having buttton on it .on click event of the button ,i want to call another frame which... frame8 extends JPanel implements ActionListener { public static final int TILED
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
How to Invoke method using Reflection API of Java?
how to call the concat method of the String class dynamically... how to call the "concat" method dynamically using the Reflection... class Now we will learn how to call the "append" method of StringBuffer
static
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,then go for static methods. If we want variables those values will not be changed
how to call javascript function from flex
how to call javascript function from flex  how to call javascript function from flex
How do you call a constructor for a parent class?
How do you call a constructor for a parent class?  How do you call a constructor for a parent class
how to call ejb with in another ejb - EJB
how to call ejb with in another ejb  Does any one have idea about ...how to call ejb with in another ejb
How to call print dialog box through JMenuItem?
How to call print dialog box through JMenuItem?  What is the way to call the print dialog box through JMenuItem to print the current page like we can do in javascript by calling window.print() function
how to call the print dialog box through JMenuItem
how to call the print dialog box through JMenuItem  What is the way to call the print dialog box through JMenuItem to print the current page...could you please help me by sending code
how to call from pc to telephone in java - MobileApplications
how to call from pc to telephone in java  Hi, presently I am working on "make a call from pc to telephone" in java. I am unable to procceed how to start. I am new this technoloy.Please give me some valuable suggestions how
How to make phone call from web application
How to make phone call from web application  I'm creating an XHTML... to make call to a specific number when user clicks a particular button. Please suggest on how to do this. I'm new to this. Thanks in advance

Ads