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
What do you mean by abstraction?
What is the difference between encapsulation and polymorphism?
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).
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
Why do we need oop?
What are the three parts of a simple empty class?
What is polymorphism programming?
How do you achieve runtime polymorphism?
What is inheritance in oop?
What is protected in oop?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
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?
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.
what is different between oops and c++
any one please tell me the purpose of operator overloading