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();
    }
}









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 the MS ACCESS database with java - Java Beginners
how to access database in applet
how to access the details - Java Beginners
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?
access
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 delete the access database value in jsp
how to delete the access database value in jsp
how to use web services to access hardware units ?
How to access data yearly from DB in C# ?
How to access the following tag from xml to jsp
how to access javascript in mozilla - Java Beginners
how to connect to MS access database in JSP?
How To Connect MS ACCESS 2003 Database in C Program with Graphics.
How to find MAC(Hardware address) address of access point
Access Specifiers and Access Modifiers
How to access sub class member using super class object
How to access Widows" Add/Remove Programs List"? - Java Beginners
How to access Contacts from gmail using LDAP in JSP dropdown list
how to send emails to many using jsp by connecting to ms access dabase.
How to store JComboBox selected Item into Ms Access Database - Java Beginners
How to Store Float Value into Access Database - Java Beginners
How to save JCombobox Selected Item in to Access Database - Java Beginners
how to connect java with ms access using odbc in eclipse
access specifiers and access modifiers
How To Display MS Access Table into Swing JTable - Java Beginners
how to access element added via javascript dynamically using jsp code
How to Open Picture From M.S. Access Database using Java Servlet ?
How to access session value using OGNL.
How and Where we Access struts Properties file - Struts
how to access the messagresource.proprties filevalues in normal class file using struts - Struts
how to access the object of one frame on clicking a button without using this keyword
How to save Selected text of RadioButton in to Access Databse - Java Beginners
how to control program/thread 's access authority - Security
How To Insert A New Record to MS Access table database in GUI
How to create and Attach MS Access Reports and Crystal Reorts in Java. - Java Beginners
ms access

Ads