what is the main usage of an abstract keyword?please follow
the program
class A
{
void display()
{
System.out.println("hai");
}
void print()
{
}
}
class B extends A
{
void print()
{
System.out.println("Hello");
}
}
In this program i was gives the implementation of print()
according to my requirements in subclass.And there is no
definition in superclass then why we can use abstract
keyword before a method that i want to gives definition in
other classes,is any mistakes in the above usage of method?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Programming Languages AllOther Interview Questions

How should a programmer decide whether to use a macro or a subroutine to accomplish a given logical function

1 Answers   R V College of Engineering, University of Jordan,


How to call static method in Java?

2 Answers   Epoch,


what is oops?

4 Answers   Satyam,


why we use abstract in awt?

0 Answers  


swap two number wthout using third variable

4 Answers   eClerx,


What do you mean by text editor?

1 Answers   Infosys,


How same session variable can be used in both Asp and Asp.net?

1 Answers   Wipro,


Why we need new operator in java at the time of object declaration and why not in c++?

1 Answers   Zensar,


iam confused to choose among testing, .net and java can anybody help me????????

0 Answers  


Write a program to read and print a text file on screen

1 Answers   Peerless,


1. Consider the following input and generate the object code using single pass assembler. JOHN START 0 USING *,15 L 1,FIVE A 1,FOUR ST 1,TEMP FOUR DC F’4’ FIVE DC F’5’ TEMP DS ‘F END

0 Answers   Wipro,


what are all the ant command options

0 Answers  


Categories