Search:

Type: Posts; User: kutysam

Search: Search took 0.20 seconds.

  1. Replies
    11
    Views
    501

    Re: Polymorphism Question

    Anyway, hope you dun mind explaining this very simple type casting to me.
    New x = new Newer();
    *Assume the two classes are above*
    and Newer extends New

    so if i put (Newer) x

    Does this mean...
  2. Replies
    11
    Views
    501

    Re: Polymorphism Question

    I have eventually understood it!

    In Code 1, there is no show(Fish f) means it will IGNORE ALL subclassess with method carrying (Fish f) in it.
    The first line that it reads will thus be in Fish...
  3. Replies
    11
    Views
    501

    Re: Polymorphism Question

    The type where an object is brought into a class and there should be a method 'calling' the object. Kinda hard to describe it.
    But if you look at the code at the first post and espacially to
    Food...
  4. Replies
    11
    Views
    501

    Re: Polymorphism Question

    I did google for that and went through a few youtube videos already. But none of them have that type of example that i'm looking for sadly..
  5. Replies
    11
    Views
    501

    Re: Polymorphism Question

    Hmm, do you by any chance have a link to a good tutorial which involves simple polymorphism and objects passing into them?
    I'm just very confused with polymorphism when it comes to,
    B1 b = new B();...
  6. Replies
    2
    Views
    396

    Re: Java command prompt

    ur program should look like
  7. Replies
    11
    Views
    501

    Polymorphism Question

    Hello! This is my first time in this forum. I hope that you guys can help me on this theory question..
    It is about polymorphism and I'm not too good at it.

    class Food{
    public String show(Food...
Results 1 to 7 of 7