what are abstract classes and how they impliment , with
example

Answer Posted / manoj kumar

abstract class is a class which may or may not contain
abstract method.
abstract class can,t be instantiated i.e. we can,t
create object of an abstract class.
abstract class can be subclasses .
abstract class is a class which is declared abstract.
if any class contain abstract method then it can be
declared abstract.
example
abstract class{

abstract public void display();//abstract method
}
abstract method is method which is declared but not
implemented i.e. without braces followed by semicolon.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by abstraction?

804


What is the difference between encapsulation and polymorphism?

816


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

1890


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

1883


Why do we need oop?

863


What are the three parts of a simple empty class?

1750


What is polymorphism programming?

832


How do you achieve runtime polymorphism?

736


What is inheritance in oop?

791


What is protected in oop?

801


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

2052


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

3100


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

1852


what is different between oops and c++

2180


any one please tell me the purpose of operator overloading

2155