How to access Subclass?

How to access Subclass?

How to access subclass in java? please tell me the syntex with an example.

View Answers

June 27, 2011 at 5:31 PM

class SuperClass{
    public void hello(){
        System.out.println("Hello World");
    }
}
class SubClass extends SuperClass{
    public void hello(){
        super.hello();
        System.out.println("Welcome");
    }
}
class SubClassExample{
    public static void main(String[] args) 
    {
        SubClass c=new SubClass();
        c.hello();
    }
}

Ads









Related Tutorials/Questions & Answers:
How to Access MS Access in jar.
How to access Subclass?
Advertisements
how to access the MS ACCESS database with java
how to access database in applet
How to access the database from JSP?
how to access python dictionary elements
how to access python dictionary elements
How to use JTable with MS-Access
How to use JTable with MS-Access
how to insert values from jsp into ms access
how to access windows registry information using java?
How to access session values through Ajax?
How to access the Title tag from xml to jsp
How to access (MySQL)database from J2ME?
how to access JQuery array in jsp page?
How to access Enterprise Beans
how to use web services to access hardware units ?
how to delete the access database value in jsp
how to delete the access database value in jsp
How to access data yearly from DB in C# ?
How to access the following tag from xml to jsp
how to connect to MS access database in JSP?
access
How To Connect MS ACCESS 2003 Database in C Program with Graphics.
How to find MAC(Hardware address) address of access point
How to access sub class member using super class object
How to access session value using OGNL.
how to send emails to many using jsp by connecting to ms access dabase.
how to connect java with ms access using odbc in eclipse
how to access element added via javascript dynamically using jsp code
how to access the object of one frame on clicking a button without using this keyword

Ads