Empty constrtuctors.. Can we extend, override or overload it?

Can we have two empty classes like this? Will this be a problem? I am just curious if we can have two classes one derive from the other. However the classes are empty. In this case, what actually happens? Are the constructors getting overriden? I am just java-technically curious...
     class Base{
     class Derived extend Base{
     }

Dear Members,
The below link clearly articulates about the safety of extending the CO of Oracle's Standard OAF Pages.
http://oracle.anilpassi.com/controller-extension-in-oa-framework-is-safe-or-unsafe-2.html
Best Regards,
R4S.

Similar Messages

  • Question about overriding and overload

    Below is a super class named Animal and subclass named Horse
    public class Animal {
    public void eat() {
    System.out.println("Generic Animal Eating Generically");
    public class Horse extends Animal {
    public void eat() {
    System.out.println("Horse eating hay ");
    public void eat(String s) {
    System.out.println("Horse eating " + s);
    public class Test {
    public static void main ( strin []agrs) {
    Animal ah2 = new Horse();
    ah2.eat("Carrots");
    At the bold line, why can not polymorphism work here.
    Can anyone explain it to me pls.
    Thanks

    800239 wrote:
    Below is a super class named Animal and subclass named Horse
    public class Animal {
    public void eat() {
    System.out.println("Generic Animal Eating Generically");
    public class Horse extends Animal {
    public void eat() {
    System.out.println("Horse eating hay ");
    public void eat(String s) {
    System.out.println("Horse eating " + s);
    public class Test {
    public static void main ( strin []agrs) {
    Animal ah2 = new Horse();
    *ah2.eat("Carrots");*
    }At the bold line, why can not polymorphism work here.
    Can anyone explain it to me pls.
    ThanksThe variable ah2 is declared as a reference of type Animal. That means we can only call methods that exist and are accessible in Animal. The compiler doesn't know or care that at runtime the Animal reference variable points to a Horse object. All that it sees is that ah2 is of type Animal.
    The kind of polymorphism where that does matter is when a child class overrides (not overloads) a non-static, non-final, non-private parent method with the exact same signature.

  • Overriding and overloading together

    Hi all,i've a qn on overloading and over-riding combined.
    Consider the following program.
    class base {
    int i;
    base(int val) { i = val; }
    void f(int i) { System.out.println("base int"); } // <1> case1
    void f(double d) { System.out.println("base double"); } //case2
    class sub extends base {
    int j;
    sub(int val1, int val2) { super(val1); j = val2; }
    void f(int i) { System.out.println("sub int"); } // <2> //case3
    void f(double d) { System.out.println("sub double"); } //case4
    class Test {
    public static void main(String argv[]) {
    base a = new base(1);
    sub s = new sub(1,2);
    base b = s;
    a.f(1);
    a.f(1.2);
    s.f(1);
    s.f(1.2);
    b.f(1);
    b.f(1.2);
    when i comment case1 follwoing is printed
    base double
    base double
    sub int
    sub double
    sub double
    sub double
    apparently the reason being, when i override the overloaded function, the over-riding will hide all the variants of the member function and not just the one which i overrode.
    Line 5 - Here the subtle issue is that we are overriding already overloaded
    function. Case2 and case3 are overloaded (in base/sub classes) and case4
    overrides case2. Due to this , the overriding hides all the overloaded
    variants of that member function and hence case2/case3 are hidden. So due
    to dynamic binding and hiding of the overloaded (case3) , sub's double is
    called. Also since sub's int is not availble, co-ercion takes place too. IS THIS REASONING CORRECT??
    Also,what happens if i uncomment case1 and comment case3??
    Where can i find more information on this??
    Any help is highly appreciated
    Regards

    Then what will happen if i uncomment case1 and comment case3?Did you try it?
    base int
    base double
    base int
    sub double
    base int
    sub doubleIt is the difference between early and late binding.
    Overloaded methods are bound early.
    Overridden methods are bound late.
    To reiterate,
    Determining which of the overloaded methods to call is done when the class is compiled[], based on the compile time type information.
    Determining which overridden version of that method to call is done at [b]runtime.
    Even if a subclass DOES have a more appropriate overloaded method to call at runtime, that method can not get used. This was demonstrated when you commented out case1. The most appropriate method it found in the base class took a float. It knew nothing (at that time) about the overloaded version in the subclass.
    So we know the signature of the method we are going to call before we run the program.
    At runtime it looks at the actual type of the object that it has, and calls the version most lately declared in the object's hierarchy - ie this resolves the overriding.
    So explaining the results above:
    It detemines at compile time which version of the overloaded methods it will call.
    Because both are available in the base class, it will call
    f(int)
    f(double)
    f(int)
    f(double)
    f(int)
    f(double)
    At RUNTIME, when you call it
    - the first object is of type base, and thus calls the int and double methods of base
    - the second object is of type sub. But it doesn't override the int version of the method, so base's implementation is used. It DOES override the float version, so you get its implementation there.
    - same result for the third object.
    Hope this clears things up,
    cheers,
    evnafets

  • Can OutputStream be overridable?

    Can OutputStream be overridable?
    Is there a pointer on OutputStream, that can be set? What methods?
    Thanks.

    OutputStream is an abstract class. Not only can you extend it, it's of no practical use unless somebody does.
    What are you trying to do?

  • Can ComboBox extend beyond boundary?

    Ok, this must be the most basic of Flash questions, but I've
    just spent about 30 minutes googling and I can't find the answer...
    even though I think I already know the answer :(
    But, let's say I want small flash control that has a combobox
    with a bit list of items embedded in my HTML page. This doesn't
    work because the items list can't extend beyond the boundary of the
    flash component, it gets clipped. Unless of course, i was to just
    make the component much bigger, but then I'd would have a bunch of
    empty space.
    Or let's say I just wanted to a flash menubar at the top of
    my HTML page. Same problem, right? I would have to make the base
    flash component big enough to handle all the dropdown menus (which
    are arbitrary in size). So I would have a menubar that takes up
    half of my page.
    Or is there some setting I'm missing? Otherwise, Flash is
    pretty much useless for embedding with HTML in these two
    situations, is that correct? In otherwords, if I want to do this,
    it pretty much needs to be all Flash (ditch the HTML)?
    Thanks!

    Was there like a deleted response I missed? Or some other
    post that gives context? Just curious how 'Flash or Flex' led to
    comments about attitude towards 'noobs'?
    It certainly is true that questions that can be found easily
    by using site: in google or whatever may receive short or no
    response. And people will generally post instructive examples or
    places to continue research rather than write/fix your code. There
    should be a FAQ sticky that explains common questions (how to I
    communicate with an embedded SWF/FlexAPP, etc.), and IMO Datagrid
    and Charts should be in a separate forum :P
    That said, yes, you will need to use wmode="transparent" or
    similar and play around with divs/z-index to make a combo box work
    the way you are trying to do. There are other combo box
    alternatives if you google flexlib, that may reduce layout changes.
    You could also use ExtenalInterface/Javascript to talk to a second
    SWF that appeared when the combo box was manipulated, to avoid some
    of the layout issues. That said, most of the people here work with
    Flex apps, where all of the components and controls are in one
    swf/set of modules, not where Flex is being used to make a single
    control in some other html layout.

  • I get a neighbor's wifi on my MacBook in my bedroom.  How can I extend the range to the MacMini in my living room?

    I get a neighbor's wifi on my MacBook in my bedroom.  How can I extend the range to the MacMini in my living room?

    You can't. It's not your network.

  • How can I extend a wireless network with my AirPort Extreme Base Station?

    Today I purchased a brand new, dual-band base station to replace my Belkin N router, as I have had a handful of firewall, coverage, and other networking problems in my house lately. First off, I really like this router and it was very easy to setup. My MacBook Pro could use both bands and established a 300 Mbit/s link very quickly. After tweaking various settings to my liking, I was also able to maximize the connections on many of my non-Apple machines and devices. I noticed that the range of its network was better than my Belkin's, but unfortunately, it failed to completely saturate the area sufficiently. Since the Belkin still works well enough, I was hoping I could bridge them together one way or the other.
    The Belkin router does not support any bridge mode that I know of, but the AirPort Extreme should be able to join a wireless network and then extend that over WiFi and Ethernet, correct? I would like to place them at opposite ends of my home so I can get strong WiFi signals everywhere inside. However, when I try to get the base station to connect to my preexisting WiFi connection, it tells me that I can't extend the network and fails to join.
    So is this possible? And if it is, how would I go about setting it up? I know it would probably be easier if I had a simple range booster such as an AirPort Express, but I didn't buy one while I was at Fry's since I hoped I could make use of the older Belkin. This is its product page, if needed. Thanks for any suggestions.
    -MacUser

    The Belkin router does not support any bridge mode that I know of, but the AirPort Extreme should be able to join a wireless network and then extend that over WiFi and Ethernet, correct?
    Sorry, but no. The AirPort Extreme Base Station cannot "join" a network like the AirPort Express or Time Capsule, but you wouldn't want to do this anyway because in this configuration these devices will only perform as wireless clients ... not routers.
    Instead, the AirPort Extreme can either be extended or can extend another 802.11g or 802.11n AirPort ... or a very very few non-AirPort devices.
    One option for your Belkin would be to connect it to the AirPort Extreme by Ethernet but this may not meet your requirements or be a desirable situation. Otherwise, you would need to get another AirPort to extend your current one.

  • Can TC extend a non-apple router via wireless?

    I believe this ground has been covered by prior questions, but I just need to confirm before giving up hope.
    Can the Apple TC extend a wireless network that eminantes from a non-Apple router (in my case, UBee, Time Warner Cable)?
    Our cable modem enters the living room, where it is plugged via ethernet cord to the UBee router. The range just barely reaches my upstairs office. In a perfect work, I'd like to keep the TC in the upstairs office so that I can a) share our USB printer, and b) extend our network to the second floor.
    Is this possible? I get the sense that it's not.
    Thanks for all your help,
    Mike

    Not possible except with WDS.. which means far too many compromises.. wep security, G only wireless.. and a very good chance it won't work anyway.
    Use EOP adapters and setup the TC as a WAP and switch.. or run ethernet .. they are the best ways.
    Turn off the wireless on the cable router.. and plug an extreme or express into it.. TC can then extend wireless.
    Again this is not the best solution but is the one apple's bottom line really likes.. which is why the limitation is there.

  • How many times can i use the limited warranty on my Apple iPhone 5, I just broke mine after getting a brand new one. Also, can I extend my warranty?

    How many times can i use the limited warranty on my Apple iPhone 5, I just broke mine after getting a brand new one. Also, can I extend my warranty?

    If you purchased AppleCare + within 30 days of getting your iPhone 5 you are allowed 2 instances of breakage replacement with a $49 deductible. If you do not have AppleCare + accidental breakage is not covered under you warranty, you can do an out-of-warranty replacement for $229.

  • I have iCloud set up fine on Windows 8 and it pulls shared photo streaming great, The problem is that in My Photo Stream folder the photos doesn't charge automatically and is empty, how can I do?

    I have iCloud set up fine on Windows 8 and it pulls shared photo streaming great, The problem is that in My Photo Stream folder the photos doesn't charge automatically and is empty, how can I do?

    Hey appleIC!
    Here is an article that will help you troubleshoot this issue:
    iCloud: My Photo Stream troubleshooting
    http://support.apple.com/kb/ts3989
    Take care, and thanks for visiting the Apple Support Communities.
    Cheers,
    Braden

  • Can I extend the slideshow horizontal in a straight line but not full page up and down?

    Can I extend the slideshow horizontal in a straight line across the page end to end, but not full page up and down?

    Hi
    Please check these videos for help :
    https://www.youtube.com/watch?v=BDgERSf2a5k
    https://www.youtube.com/watch?v=diUtfwFGI1w
    Thanks,
    Sanjit

  • Hi, i have an old imac g4 running 10 .3.9,it has 2 partitions,1st partition has os9 and osx,but would like to put ubuntu on my empty partition,can it be done if so how,thanks for reading,

    hi, i have an old imac g4 running 10 .3.9,it has 2 partitions,1st partition has os9 and osx,but would like to put ubuntu on my empty partition,can it be done if so how,thanks for reading,

    I have my iMac G3 set up with three partitions like you are proposing.
    I'd recommend getting virtual box on your new Mac.  You can install the latest Linux version easier this way.
    The problem is finding a PPC distro you like.  I forget how I configured the Linux boot manager, yaboot.  I may have skipped it or had it installed in the linux partition. 
    Ubuntu
    The Ubuntu folks stopped supporting the power PC a while back.  You will have to install an older version of Ubuntu.
    You may to modify xorg.conf. See:
    http://ubuntuforums.org/showthread.php?t=219532
    Mac G3 modem install Howto
    http://ubuntuforums.org/showthread.php?t=355205
    You may have adjust adjust xorg.conf. See these instructions:
    http://ubuntuforums.org/showthread.php?t=234437
    I was able to get the last official versions of Ubuntu working on my G3 600.
    6.10 Edgy Eft,
    6.06 Dapper Drake
    I used the alternate install and did the alterations noted above.
    These versions are listed at the very bottom of the page.
    https://wiki.ubuntu.com/PowerPCDownloads

  • Can I extend a network with an AirPort Extreme Base Station Rather than with an Express?

    Topic title pretty well sums up the question.
    I have a TimeCapsule Base Station with two Expresses for extending the network through the house.
    We're doing a 3 room addition, and there is not a convenient place to put an Express in a wall outlet in the middle room of the addition, but there's a perfect place to put an Extreme on top of a piece of furniture.
    So, can the Extreme act as an "extender" only, in lieu of using an Express?

    pcbjr wrote:
    Topic title pretty well sums up the question.
    I have a TimeCapsule Base Station with two Expresses for extending the network through the house.
    We're doing a 3 room addition, and there is not a convenient place to put an Express in a wall outlet in the middle room of the addition, but there's a perfect place to put an Extreme on top of a piece of furniture.
    So, can the Extreme act as an "extender" only, in lieu of using an Express?
    Hiya.
    You can absolutely extend a network with an Extreme. I've got a 5th gen. Extreme extending a network created with a 3rd gen. Time Capsule. On the Extreme, you'll have the option to allow (or not) WiFi clients. I recommend having all units updated to the current firmware (7.6.1 as of this writing). Note that extending doesn't work in daisy-chain fashion, meaning that your Expresses or Extremes will each connect to and extend from the TC. As such, you'll want the TC to be in as central a location as possible to offer the best coverage.

  • Can i extend ram upto 2x8=16GB in pavilion dv6-3050tx?

    can i extend ram upto 2x8=16GB in pavilion dv6-3050tx?
    This question was solved.
    View Solution.

    Hi,
    The following link shows its specs:
       http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02621602&tmp_task=prodinfoCategory&cc=us&dlc=en...
    Max is 8GB.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • I have photoshop on pc and mac can i extend my licence

    I currently have a full master collection licence on my work pc and a cc subscripion on my work mac, ive just built a pc at home can i extend my cc licence to a mac and PC.

    Hi mheaders,
    You can install CC on two machines and work on both the machines at the same time. To install CC on the third machine you will have to purchase an additional subscription.
    Regards,
    Romit Sinha

Maybe you are looking for

  • Dw images in a table

    hi. Im importing images from Fw into a Dw table. have 2 rows and an image in each row. in Dw it looks fine, but when i go to preview the page in browser, i can see space between 2 images which i dont want to see. why do i see it and how to get rid of

  • Panorama photo is blur in iOS 7

    I have iPhone 5 with iOS 7.0.2 and when i take panorama photo then photo is blur and not look good.

  • My Ipod Touch has stopped turning on and charging.  Recently it froze twice on me?  Is there away I can fix this?

    My Ipod touch has stopped working all of a sudden.   It stopped charging, turngin on etc.....It has frozen twice...Any suggestions? I am out of warranty etc.

  • Mobileme still crashing with Aperture 2.1.3

    Hello all, I'm submitting this request for support with a problem iv been having with aperture for more than a month now. I launched a new mobileme gallery through aperture and added some photos to the gallery, then aperture froze while its uploading

  • 'improved text selection feature' (revised)

    I have this problem with the adobe reader version 11.2 for the iPad iOS7. The new 'improved text selection feature' is too sensitive. It tends to highlight a whole page whenever i try to highlight just a single line. And then it keeps on crashing! Pl