Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Mangesh Pimprikar
technical Que
1 Answer(s)      2 years and 8 months ago
Posted in : Java Interview Questions


What is the exact use of abstract class and interface? Which one is better abstract class or interface?

Thank you


Advertisement
View Answers

April 26, 2012 at 12:50 PM


Interface:

Java does not support Multiple Inheritance but the multiple inheritance can be achieved by using the interface.

Interfaces are useful when you do not want classes to inherit from unrelated classes just to get the required functionality.

It relate classes from different types of hierarchy.

Abstract Class:

Any class that extends the abstract class has to provide the implementation to the abstract methods. Hence these classes can be used as a skeleton to similar classes where some common functionality may be required. Such functionality can also be embedded into these classes.

Abstract class prevents from instantiating a class that is supposed to be extended first.

For more information, visit the following links:

http://www.roseindia.net/java/master-java/interface.shtml

http://www.roseindia.net/help/java/a/interface-vs-abstract-class.shtml



Related Tutorials/Questions & Answers:
technical Que
technical Que  What is the exact use of abstract class and interface? Which one is better abstract class or interface? Thank you
JSP Que.
JSP Que.  How to pass string one jsp to another jsp without using input tag
Advertisements
que 2 - Java Beginners
que 2  WAP to input a string & print out the text withthe uppercase & lowercase letters reversed,but all other characters should remain the same. eg: input:WelComE TO School output:wELcOMe to sCHOOL  Hi Friend
que 1 - Java Beginners
que 1  WAP to enter a sentence & count the no. of times a particular word occurs in it.Display the frequency of the searched word. eg- input:the quick brown fox jumps over the lazy dog. word to be searched:the output
Technical words for Business Analyst
Technical words for Business Analyst  Please provide me the list of technical words that a business analyst can use while creating artifacts
Technical Writing
Technical Writing Do you know who writes the user manuals of various products...? It is technical writer, simplifying the technical aspects for the use of common man. As numerous gizmos and gadgets are being introduced every day, the technical writing
what does a technical business analyst do
what does a technical business analyst do  what does a technical business analyst do
QUE 50 ...please show output also...
QUE 50 ...please show output also...  Q1. Write a program to find maximum and minimum of 3 integers using nested if-else. Read numbers as a command line argument. Q2. Write a program that prints the prime no between 0
Technical Documentation,Technical Documentation Company India,Technical Documentation Services India
What is Technical Document? Unlike common document, Technical document... a good document is not an easy task. A good technical document is not much... documentation services To hire any professional technical document
Expert Technical Writers,Business Technical Writers India,Best Technical Writers from India
Technical Writing Why outsource technical writing... technical writing services RoseIndia offers comprehensive technical writing services to organizations in any industry. We
Need J2ee project technical flow - Design concepts & design patterns
Need J2ee project technical flow   Hi friend,am newbie to web development.I need j2ee project technical project flow. For example Browser ---> Controller --> Servlet(validator) <
Complete j2ee technical flow - Design concepts & design patterns
Complete j2ee technical flow  Hi Friends. I want complete technical flow of j2ee project with following technologies.jsp , servlet , Struts , Hibernate , (should follow mvc-2 design pattern) . with DAO ,DTO SERVICE
Java Technical Architect with ERP Experience
Java Technical Architect with ERP Experience       Position Vacant: Java Technical Architect...; Reference ID: Java Technical Architect with ERP Experience
Java Technical Architect with Finance Experience
Java Technical Architect with Finance Experience       Position Vacant: Java Technical Architect...://www.roseindia.net  Reference ID: Java Technical Architect with Finance
Technical Content Writer
Technical Content Writer      ..., shopping cart and hospital management, the company is popular for its online technical... articles directory, technical tutorials that consist of large number of training
Ajax - Technical Introduction
Ajax - Technical Introduction         Getting the HTTP Request Object: We have already discussed that Ajax uses JavaScript to make a request from
Technical description of Java Mail API
Technical description of Java Mail API       This section introduces you with the core concepts of Java Mail API. You must understand the Java Mail API before actually delving
Java Glossary
Java Glossary  Java Technical Glossary  Technical glossary... and nearby meanings of any technical word uses in Java and Web technology fields. Here... fields.  How to use this glossary? The technical terms are classified
Animated Web Design
Animated Web Design Animation needs the higher skill of work and experience, and animation on web not only need the art but also need the technical skills... needs higher skill of technical knowledge and experience. An outstanding
Ajax Technology
Ajax Technology         Ajax Technology Asynchronous JavaScript and XML or Ajax for short is a type of asynchronous programming technical to develop
Java Language Specification
Java Language Specification       It is written by the inventors of the java technology, The Java Language Specification, III Edition is a technical reference for the Java 
MCA Project Training
their technical skills and proficiencies into real time development environment. The course... in Java, you will be able to explore your technical skills with innovative ideas
Asset Management
Asset Management       Asset Management has several meanings for different purposes but it is generally used in economics and technical purposes. In economics
L - Java Glossary
L - Java Glossary       Java Language Specification It is written by the inventors of the java technology, The Java Language Specification, III Edition is a technical
Advertisements
 

 

 

DMCA.com