GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 143 of 502    Print  
what is difference between instance and object.?
what are the all difference between interface and abstract class?

  
Total Answers and Comments: 15 Last Update: June 13, 2008     Asked by: reema 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
October 24, 2005 20:05:11   #1  
Girish Gajwani        

RE: what is difference between instance and object.?

instance means just creating a reference(copy) .

object :means when memory location is associated with the object( is a runtime entity of the class) by using the new operator

interface is a set of abstract methods all of which have to be overriden by the class whichever implements the interface

abstract class is a collection of data and methods which are abstact (not all of them)


 
Is this answer useful? Yes | No
October 27, 2005 11:47:53   #2  
Debasankar Sinha        

RE: what is difference between instance and object.?
Question: what is difference between instance and object.?
what are the all difference between interface and abstract class?

 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
October 28, 2005 05:15:12   #3  
Mallaiah_Papinni        

RE: what is difference between instance and object.?

Hi

Instance refers to the copy of the object at a particular time whereas object refers to the memory address of the class.


 
Is this answer useful? Yes | No
November 02, 2005 06:20:31   #4  
prafulla        

RE: what is difference between instance and object.?

Interface supports runtime polymorphism but abstract class doesn't.

All methods in interface have no defination only declarations.But abstract class have methods with defination.


 
Is this answer useful? Yes | No
November 02, 2005 22:44:13   #5  
Ravi        

RE: what is difference between instance and object.?

I think that abstract classes too support run-time polymorphism for the methods that are abstract within them. For such a case the abstract class and interface provide similar functionality.


 
Is this answer useful? Yes | No
November 05, 2005 10:52:29   #6  
sushi Member Since: November 2005   Contribution: 3    

RE: what is difference between instance and object.?

if i declare any fields in the classi.e not in any methods...they r given a default value i.e for int its zero(0)..these are instance fields..........an object is an instance of a classi.e the object created is of the class type.

well in an interface you can only define the prototype of the methods it cant contain any implimentations while in an abstract class there can be absract methods and also implimentations of the method which are not abstract


 
Is this answer useful? Yes | No
November 11, 2005 16:44:39   #7  
mandyjoshi Member Since: November 2005   Contribution: 20    

RE: what is difference between instance and object.?

Object is instance of a Class.

All variables of interface are by default static final. Interface can not have implemented methods. All methods are by default abtract.

Abstract class should have at least one abstract method other methods can have implementation.


 
Is this answer useful? Yes | No
November 14, 2005 05:20:37   #8  
praveen        

RE: what is difference between instance and object.?
Girish Gajwani Wrote:

instance means just creating a reference(copy) .

object :means when memory location is associated with the object( is a runtime entity of the class) by using the new operator

interface is a set of abstract methods all of which have to be overriden by the class whichever implements the interface

abstract class is a collection of data and methods which are abstact (not all of them)



 
Is this answer useful? Yes | No
May 30, 2006 02:24:30   #9  
Amar Jagdale        

RE: what is difference between instance and object.?

Instance referes to Reference of an object.

Object is actaully pointing to memory address of that instance.

we can implement more than one interface.But We cannot extend more than one Abstract Class.


 
Is this answer useful? Yes | No
April 11, 2007 11:20:36   #10  
Raj kumar        

RE: what is difference between instance and object.?

The main difference between abstract class and interface is


1. Abstract class has the constructor but interface doesn't have.

2. Main reason is abstract class contain the instance variable that why it has
the constructor where as interface has only constants (final variables and
ABSTRACT METHODS).

3. A class which can implement the interface is not implement all methods which
are declared in interface such class is declared as abstract class. that mean
abstract class is a subtype of an interface.


This is my conclusion. If you have an queries let me know.


 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape