What is the difference between abstract class and interface?

Answer Posted / venu

A programer uses an abstract class when there are some
common features of the program shared by all the objects.
A programer uses an interface when all the features of the
program are implements differently for different objects.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between public, private, protected, and friend access?

570


Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

1347


What is a nested class?

592


What is string data type?

551


What is function and method in java?

520






Can we use a default constructor of a class even if an explicit constructor is defined?

649


Does constructor creates the object ?

582


Is a class an object?

577


Can an arraylist be empty?

564


Explain Basics of OOP Language in java

588


Why hashmap is used in java?

544


What are the basic control structures?

494


Explain the difference between call by refrence and call by value?

561


What is files manifesting?

1725


Explain all java features with real time examples

1204