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
Explain polymorphism. Provide an example.
WHAT IS THE MEANING OF CONSTANT ...EXEEDS LENGTH LIMIT WHILE COPYING FROM PS FILE TO KSDS
What is abstract Method i want the exact definition and is there any possibility to declare class as abstract without any abstract methods in that class?If it is possible then tell me why and how?
will it allow to add same value in HashMap class.
How does the type system works when there is interoperability between a COM and .Net, i mean what exactly happens there
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
In JCl , we have COND parameter.This holds comparison code and condition.It also has only and even parameters. ex: COND((4,GE),EVEN).what the comma mean here. is that 'and' or 'or'.
Please describe an example where you used object orientation in one of your programs.
Difference between views and index in sas programming
Can i please VHDL code for D-Latch with clear input ?? (HINT: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs and Outputs: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;
How to change the color of a cell or a row in a datagrid on mouse hover using javascript/.net
what is the filters in biztakk server? where it can use?
what is apt_dump_score in datastage where it is useful
what is class module in vb6? what it's use? with example..
Give examples of macro quoting function?