Difference between abstract class and interface
Answer Posted / anwar .s
Abstract class:
.class inherites one class at time
(eg)class A extends B
.if we need two class two properties.Abstract class is not
possible.becoz it doesn't support multiple inheritance
(eg)class A extendssB,c->not possible.
.we cannot create object for abstract class.it doesn't
occupy memory
.it gives structure to program
.we cannot inherits properties to Abstract class.but we can
inherits all the properties from abstarct class.
.Abstract class have atleast one Abstract method
Interface:
.interface is nothing but u give structure for project will
be created on our desire
(eg) u give plan of house to buit.u told that i want this
model house.similiar to that programmer developed the
project according to ur plan they develop the code.they cant
change ur plan bcoz all are abstract
.by using interface multiple inhertance is possible
.(eg)interface implements classA,B,c...n
.interface is bodyless.
.the variable decalared inside the interface act as final
variable.we cannot re assign
(eg)final int a=10
int a=15 it shows error while compiling.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Explain dotnet framework ?
Define a managed code? : Dot net architecture
What is .net mobile forms? : Microsoft dot net mobile
any one can explain about projectarchitecture and project approach briefly
What is MS chart control in visual studio?
Differnce between managed code and unmanaged code ?
how to delete the record using data reader
Explain the purpose of cache? : Dot net architecture
deference between display and visibility property of CSS
What is the procedure on hardware that converts the ascii value to binary? : .NET Architecture
define cache memory? : Dot net architecture
Explain the number or character entered through keyboard gets converted to equivalent ascii code & it get stored on ram in the binary form. What is the exact procedure. : Dot net architecture
Explain how does .net mobile work? : Microsoft dot net mobile
What does this do? Gacutil /l | find /i "corillian"
how to make and display a form without title bar?