Implementation of multiple inheritence

hi
i am goutam.how can we implement multiple inheritence in java.and how two super classes can be inherited in one sub class

keep it to one thread, please!

Similar Messages

  • I acheived Multiple Inheritence in JAVA !!!!!!!!

    Hi,
    Im in ob_imit2_a2 group. I can use member variables and methods of two(or more) classes in another class without importing them just like Multiple Inheritence in C++.
    TECHNICAL COMMENTS REQUIRED
    See Below
    ///////// Outer.java
    public class Outer implements myInterface, myInterface2{
    public Outer() {
    System.out.println("outer class");
    public void check()
         inter2.test();
         inter.test();
    ////////// myInterface.java
    interface myInterface{
    class interclass{
         interclass()
              System.out.println("SS");
         public void test()
              System.out.println("TEST");
    public interclass inter=new interclass();
    //////////myInterface2.java
    interface myInterface2{
    class interclass2{
         interclass2()
              System.out.println("SS 2");
         public void test()
              System.out.println("TEST 2");
    public interclass2 inter2=new interclass2();
    //////////// Main.java
    public class Main {
    public static void main(String abc[]) {
    Outer o = new Outer();
         o.check();
    }

    Any and all variables declared in an interface are always implicitly public, static, and final; meaning that they are constants and NOT member variables. You can call these methods directly from the main method (a static scope) as well; meaning that they are not associated with any instance of the class Outer; i.e. they are NOT inherited.
    The difference between inheritance (extending) and realization (implementing) is that when extending you inherit everything from your parent class, and while implementing you are taking up a role and agree to fulfill all the responsibilities (methods) of that role.

  • Interfaces to replace multiple inheritence

    Howdy,
    I have, conceptually, the following situation: I have a Ball abstract class. The Ball has several
    concrete methods. It also has an abstract method getAppearance (that would somehow return how a
    Ball is visualized). I have several "adjective" subclasses that I would like to build from it, for example:
    SpikyBall, GlowingBall, ColorBall, etc. I would like these classes to be concrete.
    Additionally, I would like to have a concrete class of any permutation of this list of adjectives, for example:
    SpikyColorBall, GlowingColorBall, SpikyGlowingColorBall. I want to accomplish this
    using as little code rewriting as possible, and, hopefully, none at all.
    Using certain other single letter languages that I won't name here, I used Multiple Inheritence. A
    SpikyColorBall would inherit from both SpikyBall and ColorBall, who both inherited from
    Ball. I was told I could accomplish this in Java using interfaces instead of multiple inheritence, which
    Java doesn't support. How is this accomplished? Could you give me (or forward me to) a good
    example? Again, the power I'm looking for is multiple inheritence's code-reusability.
    As a side note, why did Java choose to use interfaces instead of multiple inheritence?

    Courtesy of yawmark...
    composition_v_inheritance
    Bruce Eckel, author of Thinking In Java, has this to say about composition vs. inheritance:
    When deciding between inheritance and composition, ask if you need to upcast to the base type. If not, prefer composition (member objects) to inheritance. This can eliminate the perceived need for multiple base types. If you inherit, users will think they are supposed to upcast.
    Choose composition first when creating new classes from existing classes. You should only used inheritance if it is required by your design. If you use inheritance where composition will work, your designs will become needlessly complicated.
    Bill Venners: Composition versus Inheritance
    Use inheritance (of implementation) only when the class satisfies the following criteria:
    1) "Is a special kind of," not "is a role played by a";
    2) Never needs to transmute to be an object in some other class;
    3) Extends rather than overrides or nullifies superclass;
    4) Does not subclass what is merely a utility class (useful functionality you'd like to reuse); and
    5) Within PD: expresses special kinds of roles, transactions, or things.
    -- from Java Design: Building Better Apps and Applets (2nd Edition), by Peter Coad and Mark Mayfield

  • Is multiple inheritence is possible in sap?

    can any one help me?
    is multiple inheritence possible in sap ?
    and is one class can extend multiplre interfaces??

    Hi,
            Multiple inheritance as a concept is not allowed in ABAP Objects. But the effect and behaviour that you get by multiple inheritance is acheviable in ABAP objects with the help of interfaces. As follows.
    An interface can inlcude more than one interface, that is an interface can extend more than one interface. Now if you have say interface1, interface2 and interface3.
    interface4 can be declared to include all three other interfaces. And you class can include this interface4 in its interfaces tab.
    Due to this your class gets the behviour(methods) that is defined in all ther interfaces. You can assign an object of this class to a reference of any one of these four interfaces. So one object can react to method calls on four different interfaces which is what you want to achevie in multiple inheritance.
    Regards,
    Sesh

  • Implementation of multiple versions of Developer/2000

    I have not been able to locate any information that discusses
    the supported manner that multiple applications are implemented
    when multiple applications are using various versions of Oracle
    Developer. The only bulletin discusses implementing a single
    version from a network drive.
    Our 32-bit Enterprise or corporate environment consists of many
    client/server applications most of which only make use of the
    SQLNET to attach to Oracle ver 7 & 8 databases.
    Currently there is only one application (DMIS) that is running
    Forms 4.5.7.15.3 and Reports 2.5.5.19.0 from Developer 2000 v
    1.3.2 in the enterprise but other Oracle Developer appls are
    positioning themselves for rollout.
    The current operating environment looks like this:
    Application Server - contains the application's runtimes on a
    network drive (L:)
    L:\DMIS\RUNTIMES (.fmx, .rdf, .mmx, .pll...)
    Middleware Server - contains the current Oracle home dir
    V:\APPS\ORANT (v1.3.2) that this application uses
    NT 4.0 client -
    > The Icon properties are:
    >
    > Path: V:\APPS\ORANT\BIN\F45RUN32.EXE
    > MODULE=L:\DMIS\RUNTIMES\DMISMAIN
    > Working dir: L:\DMIS\RUNTIMES
    >
    > Oracle Registry: Points to Oracle runtimes on V:
    Now there are two other applications that are scheduled to
    rollout into production from two different organizations. One is
    developed using Developer 5.x and the other Developer 6.x Forms
    and Reports.
    >
    My main question revolves around how do I approach this:
    1) Do I create 2 other directories on the Middleware Server
    /orant5x and /orant6x and perform the Oracle Developer 5.x
    and 6.x installs from the same NT workstation?
    2) If so, will there be key conflicts created as a result of
    having 3 separate Oracle Home references? What would my Oracle
    registry look like?
    3) What about the System Environment Path for ORANTxx\BIN?
    4) What about the System Support Files that are copied into
    C:\WINNT\SYSTEM32?
    Will there be any conflicts on the NT client with the different
    .DLLs that need to be installed in \WINNT|SYSTEM32?
    Also:
    5) What about Forms and Reports backward compatibility between
    these versions?
    Would I be able to run a 4.5 Form and 2.5 Report with 5.x or 6.x
    Form and Report runtimes?
    Please help!!!
    null

    Aren't you supposed to study for your stats testtonight? Hm? ;-)
    No, mom, I've been studying all week and have
    prepared to the level I feel is necessary to perform
    satisfactorily on the test (despite the ill-wishes of
    certain unnamed troll-kin lurking about in the
    shadows). I have budgeted an appropriate amount of
    time to participate in the flinging of silly
    particles (an activity in which you seem particularly
    engaged in today, I might add). ;o)How many times have I told you: never mind that troll-kin, it's not even properly
    potty trained; no go clean up your room; chop-chop on the double and don't
    you dare criticising your old Mom like that. I'm telling your Father about you
    when he comes home from the pub tonight.
    Now, what was I fixin' again? Ah, yes, rats au bain marie.
    kind regards,
    Jos (with a high squeaky voice ;-)

  • Multiple Inheritence/Const Compiler bug

    I'm encountering what appears to be a bug when mixing multiple inheritence & const/non-const methods. The compiler (WorkShop 6 Update 2) is accepting the following ill-formed code :
    class Base1 {
    int a; //If Base1 is empty, the problem doesn't appear.
    //A virtual function elicits the bug as well.
    class Base2 {
    public:
    void mutator() { //non-const method   
    class Derived : public Base1, public Base2 {
    class Foo {
    private:
    Derived my_derived;
    public:
    void f() const {
    my_derived.mutator();
    int main (int argc, char* argv[])
    Foo my_foo;
    my_foo.f();
    Note how f() in class Foo is const, yet attempts to call mutator(), a non-const method that my_derived gets via inheritence to Base2. This is ill formed and should, I believe, yield a compiler error. If the code is just subtly changed, the correct error will appear. For instance, if Base1 is empty, the appropriate error appears. Alternatively, if Base2 appears before Base1 in Derived's inheritence list, then the appropriate error appears.
    Is this a known problem? Is there a patch available? I'm very concerned that this bug is allowing const-incorrect code to be developed unknowingly, as it has in the project I'm involved in.
    Thanks in advance for giving this your attention!
    David Michael

    The bug report hasn't been filed yet. If you have contract with Sun, please follow the service channel to file the report. Otherwise, I can do it for you. Please provide:
    - O/S version
    - Architecture
    Please notice that if you don't have contract with sun, the bug might be in a low priority.
    - Rose

  • Why  multiple inheritence is avoided in java.

    why multiple inheritence is avoided in java.
    r there any advantages in this???
    can u briefly explain with programming so that it will be clear.

    Here is one of several discussions of this topic to be found on the web:
    http://csis.pace.edu/~bergin/patterns/multipleinheritance.html

  • Is Java allow multiple inheritence?

    Hi,
    I am having class A and class B, and class A exteds Class B. All class in Java extends Object class by default,
    1. class B extends one class Object
    2. class A extends two classes class B and class Object.
    Now class A extending two classes is it correct?
    Kindly help me.

    RajivGuna wrote:
    Hi,
    I am having class A and class B, and class A exteds Class B. All class in Java extends Object class by default,
    1. class B extends one class Object
    2. class A extends two classes class B and class Object.
    Now class A extending two classes is it correct?
    Kindly help me.What you described isnt multiple-inheritence , more like multi-level inheritence .Java allows a maximum of one direct superclass for a class , and the situation you described doesnt violate that restriction.

  • Multiple inheritence occured in java?

    we know java doest support multiple inheritence
    we know the super class for all java classes is Object
    ex:
    class A
    class B extends A
    here A extending Object
    and B extending Object(by default ) and extendin A
    is multiple in heritence occured
    if u say its multilevel inheritence how will u prove that programatical?

    we know java doest support multiple inheritence
    we know the super class for all java classes is
    Object
    ex:
    class A
    class B extends A
    here A extending Object
    and B extending Object(by default ) and extendin A
    is multiple in heritence occuredno, multiple inheritance occurs when a type directly inherits from more than one other type
    if u say its multilevel inheritence how will u prove
    that programatical?huh ?

  • CacheStore implementation for multiple table

    Hi,
    Is it possible to configure the <cachestore-scheme> element or implement cachestore to get data from multiple
    table. Currently the xml and cachestore sample in the tutorial is configured for single table.
    Thanks
    -thiru

    hello Aleks,
    "As Rob mentioned, you can implement CacheStore to do pretty much anything you want: do a join across multiple tables, execute multiple queries to get data from multiple tables, or even access non-database system, such as a legacy system or a web service in order to retrieve data. Coherence really doesn't care how you implement your cache store and where you get the data from, as long as you return a single object for the load method that needs to be inserted into the cache that the cache store is configured for (or in the case of loadAll, multiple objects in a map)."
    as long as you return a single object for the load method that needs to be inserted into the cache that the cache store is configured for (or in the case of loadAll, multiple objects in a map) -> when you say this.. how can we configure the cache store to be configured for an object?
    I am new to the coherence. Correct me if I am wrong.
    because as I see cache-store will be configure with cache right?
    <cachestore-scheme>
      <class-scheme>
       <class-name>com.company.MyCacheStore</class-name>
          <init-params>
             <init-param>
                <param-type>java.lang.String</param-type>
                <param-value>cache-info</param-value>
             </init-param>
          </init-params>
      </class-scheme>
    </cachestore-scheme>
    Here it is referring to the cache "cache-info" and in the cache "cache-info", I can have Object1 with Key1, Object2 with Key2 and Object3 with Key3, As long as I return any object (object1,object2,object3) it is fine right.
    My cache have 3 objects Object1,Object2 and Object3,
    In cache-store, based on type of the Key I will perform the processing and return the corresponding object. Is it wrong?
    Please comment.
    Thanks in Advance.

  • Implementation of multiple media tracks in HTML5 video

    Hello,
    There is an existing API for dealing with multiple media tracks in HTML5 video, which is described here:
    http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content.html#media-resources-with-multiple-media-tracks
    Do you have any plans on implementing this in Firefox? If so, do you have any estimated timeframe?
    Best Regards
    André

    hello andre, a basic implementation of it is landing in firefox 33. for reference please see [https://bugzilla.mozilla.org/show_bug.cgi?id=744896 bug #744896].

  • CRM 2007 implementation in multiple languages

    Hi,
    We would like to implement SAP CRM 2007 Web UI and Interaction Center in multiple Asian languages like Chinese (Mandarin), Korean and Japenese.
    Is there a standard approach or documentation in this regard?
    How will Master data get translated?
    Is it necessary to maintain customizing settings descriptions in each of these languages?
    How to make UI help documentation available in these languages?
    If any of you have worked in this kind of scenario, please help.
    Helpful answers will certainly be rewarded.
    Regards,
    Paul Pandian

    You have to upgrade to Unicode if your systems are not unicode already.
    You have to maintain all the descriptions and texts in the master data multiple languages. See the note on [Unicode Conversion Guide|https://service.sap.com/sap/support/notes/551344]
    If you have multi language already available in your R/3 or ECC system, then it is possible that your systems are in multiple code page.Unicode conversion from different code pages are different and you must watch for any restrictions. For example - Unicode conversion from HK Chinese using code page 8340.

  • Ovs implementation for multiple field

    Hi,
    Is it possible to set OVS(Object Value Selector) for multiple input fields in a single screen?
    Field1: From  [ ] To [ ]
    Field2: From [ ]  To [ ]
    Field3: Form [ ]   To [ ]
    where [] being the input field, and user entered value should retain there like
    Field1: From [11] to [22]
    Please let me know, if you any suggestion on implementing.

    If I implement seperate OVSListener for each From and To fields with sepeare context attributes, it works.
    But , I am trying to re-use same OVSListener for both From and To field, as the data to which comes from same RFC. Using single ovslistener, set the selected entry only to the From input field, if it is differentiated with seperate context attributes.

  • AIA support for multiple brands implemented in multiple instances of Siebel

    Good Day!
    I would like to ask whether AIA has the capability to support multiple brands in terms of multiple instances of Siebel and BRM.
    I have a client wherein they have a scenario of:
    1.) To launch 4 different brands which contain multiple services and it has been decided that anything that holds customer specific data should be all in a separate instance (which would cover SIEBEL, BRM etc.)
    2.) It is also a plan to have systems which only contain transactional data (mainly transient information) to have a central deployment platform (This would typically include OSM and AIA)
    I've heard that this is possible with AIA but with heavy customization is required to be done. In case for customization, are there any white paper / documentation which talks about this?
    So to summarize, here are the key questions:
    -- Support of AIA to integrate multiple instances of Siebel, multiple instances of OBRM and single instance of OSM
    -- Does AIA PIPS (mainly O2C, AABC) support data models (account, subscription, etc.,) of different services like 2G, 3G, LTE and Enterprise
    -- Does AIA support more than 2 level hierarchies
    -- Does AIA support charge redirection within the hierarchy
    -- Does AIA PIPS support different MACD scenarios like suspend, resume, account movement within & across hierarchies especially for Enterprise Services?
    Regards,
    Jeff

    First off - Have no knowledge of ERPi - Just googled it.
    If its any help, we have multiple instances of EBS on the same box, we have seperate DWH (and ODI Work / Master Repos) environments aligned to these instances. An ODI Agent can only communicate with one ODI Work repository, hence we have Multiple Agents so we can use the EBIZ -> DWH pairs simultaneasouly.
    Maybe someone will come along and tell us how it could work differently, until then - its works for us!

  • Implementing in Multiple Timezones

    We are implementing Apps 11i in the US, Europe, Australia and
    India and are looking for a good way to have each location see
    system dates/times in their local time. Does anyone know of a
    way to do this? We have investigated several options, but have
    not found a way that solves our problems.

    I am not sure about Apps 11i, but in Oracle 8i you have the
    new_time function (which is quite useless if you want to cover
    Australia/India), but 9i has much better local time support.
    In case of 8i, look at the STANDARD package in SYS schema.
    Perhaps dbtimezone and sessiontimezone functions from that
    package may help.
    --Shirish                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Error message when I try to update phone

    I havent updated my iphone since 2011 as I cant get passed an error message 1403. It says my iphone is corrupt. I have updated Itunes so many times and run diagnostics. I have backed up my phone and tried to restore but it says it is corrupt and can

  • Configuration file "config\jazn.xml" does not exist

    I have just installed 10g and am trying to setup iSQL*PLUS/dba. I found directions here http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/ch3.htm#BCEIHEJF, however, when I try to start the JAZN shell or run the command line to creat

  • USB Document Access & Wireless Printing

    I`m interested in an IPad. My wife uses an XP based netbook for her job, simple client info document use she does nothing really difficult or demanding with this machine. Her birthday is next month and I`d like to replace her netbook with an IPad how

  • How to Solve 'Row currency has changed'!

    Hi,all I hava encountered a problem: in my create info page,i click one button and popup a dialog page to select a record from the list in the popup page,when i select one more record,problems occur: JBO-35007: Row currency has changed since the user

  • Cancel the cancelled billing document

    HI friends, I have cancel the billing document in VF11.but posting date was wrong so i want to cancel the cancel billing document how I can do this ? Regards, Chetan