Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Interview-Questions how to call static method
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


babuganga
how to call static method
1 Answer(s)      3 years and 8 months ago
Posted in : Java Interview Questions


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


Advertisement
View Answers

April 18, 2011 at 10:37 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 class 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 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 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 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
Static method
Static method  what is a static method?   Have a look at the following link: Java Static Method
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... AdaugaChitanta.java. If I don't call a method, then I have to run FereastraPrincipala.java again
static method
static method  Give some absolute examples and definition for static method also
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
how to open one Jframe from main method call
how to open one Jframe from main method call  I have downloaded... the main() method, when i run this Engine.java class game starts running...(containing main() method) Snake.java GameBoard.java PlayGame.java
Java static method
Java static method  Can we override static methods
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
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...(String args[]. The motive of it is that static in JVM can call it directly
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
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 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
How to call servlet in JSP?
How to call servlet in JSP?  How to call servlet in JSP
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
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
Why servletcontainer can,t call the Init() method ?
Why servletcontainer can,t call the Init() method ?  Why servletcontainer can,t call the Init() method
can we inherit static method in java?
can we inherit static method in java?  can we inherit static method in java
Calling Static Methods Using SpEL
-beans.xml: We will see how to use static method random() of java.util.Math class...Calling Static Method Using SpEL Spring 3 provides powerful Expression... to demonstrate how SpEL is used to wire value by calling static  method
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
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
STATIC
BETWEEN STATIC BLOCK AND STATIC METHOD?   A STATIC block is automatically... between static block and static method: static block will execute when ever... from static method"); } public static void main(String[] args) { helloMethod
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. PHP Set Static Method Example: <?php class A { public
 

 

 

DMCA.com