Free Jobs

Java Questions: Core Java (182) J2EE (32) EJB (22) Servlet (33) JDBC (35) Hibernate (17) Struts (15) Swing (26) Oracle (12) JSP (36) Other (0)

Question: What is the difference between an Interface and Abstract Class In Java

To get the Posted Questions details daily in your mail Click Here

Share this question on Facebook/Twitter/Orkut Bookmark and Share

User: mohit555 Post Date: 07 Feb 2012 09:56

What is the difference between an Interface and Abstract Class In Java

  1.An Interface in java Have no implementation code in methods

    But An Abstract class in java may have both Implementation

    as well as nOn implementation Methods.

  2.A Class in java can implement any number of interface

    but a class in java can implement(Inherit) only one Abstract Class.

  3.An Interface in java can not have a constructor

    But an Abstract class can have a constructor.

  4.All members of an Interface in java must be public

    But All memebers of an Abstract class may not be public

  5.There is no instance method for an Interface

    While there may be instance method for Abstract Class.

About Writer:
Hi All,I am Java Developer From Bangalore

Writer's Link:

Writer's Email:


Post Comment

Similar Questions Top QuestionsLatest Questions Other Questions by this Author Copyright © 2009-2011 | All Rights Reserved
All content of this website is protected by copyright laws and should not be reproduced in any form or by any means without written permission
(Best viewed in IE 8.0+ or Firefox 3.0+ at resolution of 1024 * 768 or higher)