Results 1 to 3 of 3

Thread: About Exception

  1. #1
    suresh.sa is offline Member
    Join Date
    Oct 2010
    Posts
    14
    Rep Power
    0

    Default About Exception

    Hi Friends,

    Can anyone tell exactly,at wat situation we have to go to abstract class and at wat situation we have to go to interfaces.

    And also in this code

    interface i1
    {
    public void method1();
    }
    interface i2{
    public void method1();}
    class sample implements i1,i2{

    // here we have to implement two method1() or just one is enough?
    }

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    // here we have to implement two method1() or just one is enough?

    That's a good question. What happened when you tried it?

    As far as abstract classes and interfaces go, google:+java +"abstract vs interface" yields 15000 results. An embarassment of riches! Perhaps you could start with Maximize flexibility with interfaces and abstract classes from JavaWorld.

  3. #3
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    Also I think you may have homework dumped the wrong question!

    Seriously though, you will learn a *lot* more by expressing an opinion based on what you have read and tried than by offering pleas to forum based oracles. You won't get flamed if it's clear you're trying.

Similar Threads

  1. Replies: 4
    Last Post: 10-25-2010, 08:42 PM
  2. exception
    By mohneesh in forum New To Java
    Replies: 3
    Last Post: 08-16-2009, 03:28 PM
  3. Help with Exception
    By bozovilla in forum New To Java
    Replies: 2
    Last Post: 10-19-2008, 06:19 AM
  4. Exception
    By rmaadil in forum JDBC
    Replies: 1
    Last Post: 05-19-2008, 01:45 PM
  5. Replies: 1
    Last Post: 03-08-2008, 07:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •