Can inner class satisfy our multiple inheritance limitation

i mean to say for eg
static inner class extending applet and outer class extending some
different class

hello that was just a eg
if i go in deep its like this the remote method that i m having in the outer class is having a string i declare a globle varial of type string store the the String from remote method
(remember the outer class i m taking is the serverside code which extends Unicastremote object
and it has a inner class extending applet)
that is being passed by the client to the remote method display the string using repaint or paint method
this will b like a client chating to server
did u get it;

Similar Messages

  • Doubt on Multiple Inheritance

    Hi all,
    I am confused by the java statement that "By using interface we can achieve multiple inheritance bcoz java doesn't support Multiple inheritance".
    Yes.Ok java doent support Multiple inheritance. Now we know that inheritance means that "one object acquires the property of another object".
    So how can it is possible achieve Multiple inheritance by interface.
    Interface that contains just undefined methods like below code.
    interface Member1
         public void eye();
         public void nose();
         public void mouth();
    interface Member2 extends member1
         public void neck();
         public void hand();
         public void stomach();
    interface Member3 extends Member1,Member2
         public void leg();
    class Man implements Member3
         public man()
         Member3 ref=new Man();
         // Here Implements all 7 methods.
    Is the above code defines multiple Inheitance?
    undefined methods are eye,nose,mouth,neck,handand stomach are fall in Interface Member3 .Yes. But Inheritance means that one object acquires the property of another object.Property means that code and data.
    In here, there is no code just declarations of method which is not to be a code .
    So How can we say interface achieve multiple inheritance.
    Please any one explain and clear my doubt with simple example.
    with cheers,
    G.GandhiRaj.

    Multiple inheritance is about aquiring both behavior and attributes from two or more sources. A lot of times, this "is a" relationship is confused with "has a" relationships.
    For example, a Book "has a" Page. A Book "is a" Publication. So multiple inheretance in this instance would come from stating that a Book "is a" Publication and "is a" PaperProduct. In this example, you could redesign your model and state that a PaperProduct inherits from Publication. However, a Book doesn't have to be limited to being a PaperProduct, it can also be an ElectronicProduct, thus inhereting attributes and behaviors from this new class as well. In essence, the Book can exist in two forms simulataneously (as many actually do). So you still have the need for multiple inheritance - perhaps.
    Interfaces define the behavioral aspects of multiple inheritance. You loose the aquisition of attributes from base classes. In many cases this is acceptable. For the first time I recently found a true need for multiple inheritance in one fo my Java apps. Some would say that my data model is poorly designed then. So I tried restructuring the model and that solve the problem.
    It is probably a good idea to completely understand your data model from many dimensions first before resorting to the copying of attributes like I almost did. Don't be locked into a design too quickly. Be willing to change your mind and you will probably find a solution that works.

  • Using Reflection can we find out details of inner classes in a class

    Hello All,
    Thanx in advance.
    I intend to figure out the name of the inner class and methods declared inside it. How can this be done using reflection API's.
    I need the above information to make an automated java doc creation tool for the project I am working in.
    Thanx again...
    VIkas

    Thanx silkm,
    Actually suggestion # 1 I have already tried. I used
    getClasses() method which returned me a Class[] of
    length = 0. i dunno Why?Because you are not using the reflection API correctly. If you read the javadocs you would know that it is structured so that all getXXX() methods return all XXX things that are public and are either declared by the target class or possibly inherited from superclasses.
    As contrasted to that, getDeclaredXXX() methods can return all XXX things (including private) but only declared by the target class (not inherited).
    You got an empty result back in your case most likely because all your nested/inner classes were non-public. Use getDeclaredClasses() instead.
    As to suggestion # 2, the exercise I am doing is a
    step before using the java doc tool. One has to insert
    a javadoc comment before the method begins in order to
    create a java doc. So thats it.This is independent of the reflection API but you might consider using the doclet API for this.

  • Replacement for multiple inheritance in MovieClip class

    Hello
    I need your opinion about a problem.
    Commonly, when you need to replace multiple inheritance, you do it by making an aggregation with one of the class involved.
    But in case of MovieClip attached class, there is one more class involved in the process : the MovieClip class, and this class can't be the one aggregated because every class attached to a MovieClip need to inherits from it.
    The problem is if the other class can't be also aggregated because it has some abstract class behaviour, for instance, call of a virtual function.
    A solution could be making the abstract class inherit from the MovieClip class, but what if you want to reuse its behaviour in a class which have nothing to do with MovieClip ?

    This is Not Supported in WebLogic that the Remote Interface extends other Interfaces. Because Annotation Processor just looks up inside the implemented interface methods. The actual interface which is Implemented by the Bean Class. So the Methods declared inside the Interface B and Interface C will be ignored and will not be available as part of the generated Stubs. Thats why u are getting NoSuchMethodError.
    You can even contact Oracle Support on this...there are 3-4 Cases on it. And the Solution is Work As Designed.
    Workaround is : edit your interface A as following
    Declare all the Business Methods only in the Remote Interface and not inside it's Super Interfaces.
    Example:
    @Stateless(name="A")
    @Remote({A.class})
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public class AImpl implements A {
    @Override
    public void writeA() {
    System.out.println("A");
    @Override
    public void writeB() {
    System.out.println("B");
    @Override
    public void writeC() {
    System.out.println("C");
    @Remote
    @JNDIName(A.JNDI_NAME)
    public interface A extends B, C {
    public static String JNDI_NAME = "A_JNDI_NAME";
    void writeA();
    void writeB();
    void writeC();
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • ERROR: RUL-00025:fact class multiple inheritance not supported

    I am receiving this erro message when trying to invoke a rule (assert, execute ruleset,retrieve results) on a XML Fact structure that has demo element as parent with a ref to two child elements: invoice and po.
    I simply used the wizards to deploy the decide activity so I have no clue what this might be.
    The rule session EVALUATEAPPROVAL:230011 failed to execute step assert
    RUL-00025:fact class multiple inheritance not supported
    oracle.rules.rl.exceptions.RLRuntimeException: fact class multiple inheritance not supported
         at oracle.rules.rl.exceptions.ExceptionFactory.createRuntimeMultipleInheritanceException(ExceptionFactory.java:467)
         at jess.DefinstanceList.autoDefclass(DefinstanceList.java:996)
         at jess.DefinstanceList.assertObject(DefinstanceList.java:570)
         at jess.Rete.assertObject(Rete.java:1557)

    RL only supports single inheritance, either from an interface or a class. JAXB 1.0 generates a set of classes that inherit and implement each other. If the RL code is generated in the wrong order and child classes are generated before parent classes, then you get the indicated exception. In most cases, not importing the element class will prevent this from happening, and in the rest not importing the ObjectFactory class will prevent it (or unchecking the "supportsXpath" option). You can't use the element class in the rules anyway since the properties it inherits from it's parent don't show up in lists.
    So, it's not the complexity of the XSD that matters in processing, only that a single inheritance chain is specified. If you follow the original instructions with your complex XSD, I believe you will see it work correctly.
    This has been fixed in the as-yet-unreleased 10.1.3.4 version, but the only workaround for released versions is above.

  • Multiple Inheritance of Class problem

    I want to inherit two classes in my class
    Since java does not support multiple inheritance of java classes , only can implement java interface , how can I achieve this .

    I too have a dream.
    Someday I want to see a design that uses multiple inheritance correctly. And as long as I am dreaming it might as well be a design that is not dependent on legacy applications.
    I strongly suspect that it will forever remain a dream.

  • Who can explain inner class to me?

    //InheritInner.java
    //Inheriting an inner class
    class WithInner
         class Inner{
              Inner()
              {System.out.println("Inner class");
         WithInner()
         {System.out.println("WithInner");}
    public class InheritInner extends WithInner.Inner
         //!InheritInner(){}//Won't compile
         InheritInner(WithInner wi)
              wi.super();
         public static void main(String[] args)
              WithInner wi=new WithInner();
              InheritInner ii=new InheritInner(wi);
    Who can explain this subclass constructor to me?
    I appreciate your help!

    Here's the class that in 'Thinking in Java'. For some reason, yours is completely different.
    //: InheritInner.java
    // Inheriting an inner class
    class WithInner {
      class Inner {}
    public class InheritInner
        extends WithInner.Inner {
      //! InheritInner() {} // Won't compile
      InheritInner(WithInner wi) {
        wi.super();
      public static void main(String[] args) {
        WithInner wi = new WithInner();
        InheritInner ii = new InheritInner(wi);

  • Inheriting inner classes

    Hi everybody,
    I can't seem to find a clear answer on this, and it's probably a silly simple question, but here goes (it needs a little setup first)--
    A base class X has two subclasses, Y and Z.
    Both Y and Z have static inner classes which contain a factory method that calls their constructors (that is, the methods call the constructors for class Y or class Z).
    Is it possible to have an inner class Q in base class X which can be inherited by classes Y and Z and used to call the constructors of Y and Z?
    Making a separate inner class for each subclass works fine, but they are very similar from class to class, and it would be nice to be able to do this to cut down on code.
    If this is possible, I have one more question:
    Is it possible to have an inner class R in class Y that extends inner class Q in class X?
    If anyone could give me some clarification on these questions, and, if possible, the syntax to answer them, I'd appreciate it.
    Thanks,
    Jezzica85

    jezzica85 wrote:
    Is it possible to have an inner class Q in base class X which can be inherited by classes Y and Z and used to call the constructors of Y and Z?No. If you write new Y() you have named the class you are instantiating. There's no simple way (short of reflection) to express "some other class".
    By the way, did you see my reflection example in your other thread?
    Making a separate inner class for each subclass works fine, but they are very similar from class to class, and it would be nice to be able to do this to cut down on code.You can move most common code up the hierarchy.
    >
    If this is possible, I have one more question:
    Is it possible to have an inner class R in class Y that extends inner class Q in class X?The simplest way to find out is to try it:
    class X {
        class Q {}
        static class S {}
    class Y extends X {
        class R extends Q {}
        static class T extends S{}
    }--BDLH                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Why can we have only one public class in our program

    Why is it that we can specify only one class as public in our source code .................................................
    Once i'd put one inner class as public ...which means now i have 2 public classes ..............out of which one is the inner class...what is the use of such public class which can be accessed by only its outer class.........
    plz. help

    Once i'd put one inner class as public ...which means
    now i have 2 public classes ..............out of
    which one is the inner class...what is the use of
    such public class which can be accessed by only its
    outer class.........
    plz. helpWrong.
    Public inner class can certainly be accessed outside.
    You just have to preface it with the name of the outer class.
    A.java
    =====
    public class A {
       AA example = new AA();
       public class AA {
           public int value() { return 5; }
    }B.java
    =====
    public class B {
       public static void main(String[] args) {
          A x = new A ();
          A.AA y = x.example;
          System.out.println(y.value());
    }

  • Hi All , Will Java supports Multiple Inheritance  classes???

    Hi All ,
    Will Java supports Multiple Inheritance by classes???
    Thanks in advance,
    Prakash

    No, Multiple inheritance would look like
    public class A extends B,C {(You can do that in C++, but it's rarely a good idea).That's not true at all. It's not inherently harmful, in C++ or any other language. It's entirely possible to do it correctly when it truly makes sense.
    Java just guarantees that nothing bad can happen to you by only allowing multiple inheritance of interface. You can't ever have multiple inheritance of implementation, that's all.
    %

  • Using Inheritance,dose child class have father 's inner class?

    using Inheritance,dose child class have father 's inner class?

    as near as I can tell, the conversation so far has been:
    When I extend a class, does the subclass inherit the parent class's inner classes?
    followed by
    Never mind, i ran a test and found out the answer, sorry for my English.
    hope that helped.
    Lee

  • How do we split our iCloud accounts but keep one iTunes account so we can share purchased content for our multiple iPhones and iPads?

    How do we split our iCloud accounts but keep one iTunes account so we can share purchased content for our multiple iPhones and iPads?

    You can migrate a copy of the data to a new account, then delete the other person's data from each account.  To do this, on the phone that will be changing accounts, if you have any photos in photo stream that you want to keep on the phone, save these to your camera roll by opening the photo stream album in the thumbnail view, tapping Edit, then tap all the photos you want to save, tap Share and tap Save to Camera Roll. If you have any synced notes that you want to keep on the phone, email these to yourself so you can create new notes in the new account.
    Once this is done, go to Settings>iCloud, scroll to the bottom and tap Delete Account.  (This will only delete the account from this phone, not from iCloud.  The phone that will be keeping the account will not be effected by this.)  When prompted about what to do with the iCloud data, be sure to select Keep On My iPhone.  Next, set up a new iCloud account using a different Apple ID (if you don't have one, tap Get a Free Apple ID at the bottom).  Then turn iCloud data syncing for contacts, etc. back to On, and when prompted about merging with iCloud, choose Merge.  This will upload the data to the new account.  You will create a new icloud email address with you turn Mail to On.
    Finally, to un-merge the data you will then have to go to icloud.com on your computer and sign into each iCloud account separately and manually delete the data you don't want (such as deleting your wife's data from your account, and vice versa).

  • HT202213 Can multiple iPhones share one iTunes without syncing the phones together? We just got new iPhones and set up desperate apple id's, but don't know if we can both sync to our existing iTunes without linking our phones together (contacts, apps, etc

    Can multiple iPhones share one iTunes without syncing the phones together? We just got new iPhones and set up seperate apple id's, but don't know if we can both sync to our existing iTunes without linking our phones together (contacts, apps, etc) ????

    How to use multiple iPods, iPads, or iPhones with one computer

  • We got a new Apple TV for Christmas and it works wonderful. However, my question is this. We are on a satelitte internet system and our bandwidth is limited. Can anyone tell me what effect it will have on using up my 10 megs of bandwidth?

    We got a new Apple TV for Christmas and it works wonderful. However, my question is this. We are on a satelitte internet system and our bandwidth is limited. Can anyone tell me what effect it will have on using up my 10 megs of bandwidth? If I run over the 10 mgs, the service either slows way down until it is reset on the first of the next month or I have to purchase additional bandwidth and it can get expensive.
    Any information would be greatly appreciated.

    If you only have a 10MB limit on the Internet connection you might as well not have Internet access and certainly should not attempt to stream anything.
    If the limit is 10GB, then you will need to be careful with streaming as most video is 1-3GB for a one hour show.

  • Why only final variables can be accessed in an inner class ?

    Variables declared in a method need to declared as final if they are to be accessed in an inner class which resides in that method. My question is...
    1. Why should i declare them as final ? What's the reason?
    2. If i declare them as final, could they be modified in inner class ? since final variables should not modify their value.

    (Got an error posting this, so I hope we don't end up with two...)
    But what if i want to change the final local variable within that method instead of within anonymous class.You can't. You can't change the value of a final variable.
    Should i use same thing like having another local variable as part of method and initializing it with the final local variable?You could do. But as in the first example I posted you are changing the value of the nonfinal variable not the final one. Because final variables can't be changed.
    If so, don't you think it is redundant to have so many local variables for so many final local variables just to change them within that method?If you are worried that a variable might be redundant, don't create it. If you must create it to meet some need then it's not redundant.
    Or is there any alternate way?Any alternate way to do what?

Maybe you are looking for

  • Error while calling BAPI_GOODSMVT_CREATE back to back

    hi, all i am calling two back to back bapi, BAPI_GOODSMVT_CREATE  1st for movement type 313 and then for 315 for same serial nos (100 in nos.) I have even used bapi_transaction_commit with parameter wait = 'X', after  the 1st bapi(313).  The first BA

  • Is inventory Org possible without Multiorg?

    Hi, Is it possible to have an inventory org with out a Multiorg?Rather is it possible to create an inventory organization with out any set up for Multi Org? Thanks

  • Weird problem during synchronization !!!??

    Hi all I came accross a weird problem during synchronization. I am into customizing MAM2.5, and in testing phase. I created 600 local measurement documents and tried to sync. Nearly half of the documents got successfully posted at the back end and go

  • Skip Spell Check on Master Pages

    Is there any way in InDesign CS6 to spell check the entire document, but omit the master pages?  Sometimes when I run spell check, it only checks the document, but other times includes the master pages.  I can't figure out why this happens, but would

  • Proxy Object generation error using Wizard for Web Service Consumption

    HI all, I am using the Web Service Proxy Object Generation Wizard (via SE80) and have successfully been able to create a Proxy Object for a Web Service which resides on our INTRAnet. ...But now I am trying to consume a Web Service out on the INTERnet