Answer Posted / manoj kumar verma allahabad(ba
Abstract class shows kins of relationship.it is the impure
abstract.Abstract class can have method with body or
without. Abstract class can not be instantiated.e.g. Object
nahi ban sakta abstract class ka.
for example :-
abstract class Shape
{
abstract void area(); // No body compulsory to be
overriding
void show()
{
System.out.println("Shape is the show");
}
}
class circle extends Shape
{
void area()
{
}
void show()
{
System.out.println("Show the circle");
}
}
class Testabstract
{
public static void main(String ar[])
{
circle c1=new Shape(); // error object of
abstract class cannot be made
circle c2=new circle();
c2.area();
c1.show();
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is the difference between Windows application and Unix application?
Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 2 numbers. Find the missing numbers.
What is Negative testing?
Explain polymorphism. Provide an example.
what is client server & server? What r types of Joins? explsin it! which types of indexex in sql server? what is triggers?
Is the IT field raise again? What is the position of IT after 4 years?
in cobol,wat is the difference in using 'set index in occurs clause' ....and 'occurs depending-on clause'
You are given some denominations of coins in an array (int denom[])and infinite supply of all of them. Given an amount (int amount), find the minimum number of coins required to get the exact amount. What is the method called?
What r the attributes using in Win Runner?
How to change the color of a cell or a row in a datagrid on mouse hover using javascript/.net
when a query is made on Logical file in DB2/400, will the records satisfying select/omit criterion be fetched from all members of physical file or only the member with same name as physical file?
When we have two versions of the dot net installed how does the compiler know which version of DLL it has to select to an application.
why we use abstract word in abstract window toolkit in java language.
Why did you ever become involved in QA/testing?
How do i find out the number of parameters passed into function?