Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Confused About Interface Classes

  1. #1
    Banned
    Join Date
    May 2011
    Posts
    26
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Confused About Interface Classes

    Diagram:diagram.jpg
    ================================================== =========
    Constructors:
    public ConsLoIF(ImageFile first, ILoIF rest) { }
    public MtLoIF() {}
    public ImageFile(String name, int width, int height, String kind) {}
    ================================================== ============
    EXAMPLES
    //Image samples
    public ImageFile img1 = new ImageFile("dog", 300, 200, "jpg");
    public ImageFile img2 = new ImageFile("cat", 200, 200, "png");
    //List of Images
    public ILoIF mylist = new ConsLoIF(img1,new ConsLoIF(img2, new MTLoIF()));
    ================================================== ===========

    Question : How can I extract the image objects from mylist? So I can compare each
    one and put them in a new ILoIF

    PLEASE GIVE AN EXAMPLE (any simple method would suffice)

    THANK YOu


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Confused About Interface Classes

    What have you tried?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. I'm confused
    By Wonderlandslost in forum What's Wrong With My Code?
    Replies: 7
    Last Post: March 2nd, 2012, 01:33 PM
  2. help me , im confused!!!!
    By sephskie in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 11th, 2011, 10:52 AM
  3. Confused..
    By jadowers in forum What's Wrong With My Code?
    Replies: 0
    Last Post: October 5th, 2011, 12:56 PM
  4. [SOLVED] confused
    By joon in forum What's Wrong With My Code?
    Replies: 4
    Last Post: June 12th, 2011, 11:40 AM
  5. I'm confused...
    By acolar in forum Object Oriented Programming
    Replies: 1
    Last Post: April 14th, 2011, 12:14 PM

Tags for this Thread