propellerads adcombo
  1. The Essential Kit For Affiliate Marketers

    Guaranteed to work, always updated, top quality essentials.
    Easy to work and packed with features that make you more money.
    Coming Soon.
    Dismiss Notice
Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.


Discussion in 'Programming and Scripts' started by gkumar, Sep 1, 2009.

  1. gkumar

    gkumar Affiliate affiliate

    How does Java inheritance work?
  2. sdnsoft

    sdnsoft Affiliate affiliate

    Like in all other object programming languages. If you have class A that have some public or protected attributes and you create class B that inherit from A then B by B you can access all public attributes of B and A as well and in B you can access protected attributes from A.

    Simple sample (because topic is much more complicated i would suggest reading some documentation or tutorials about object programing):

    class Vechicle
    public String Engine; //all our vechicles have some kind of engine

    class Bike inherit Vechicle
    public bool IsCross;

    Next you can use:
    Bike honda = new Bike();
    honda.Engine = "750";

    Hope it will help to start...

Top Resources