abstract class A
{
abstract void callme();
void callmetoo()
{
System.out.println("this is concrete method");
}
}
class B extends A
{
void callme()
{
System.out.println("implementation of callme");
}
}
public class abstractdemo {
public static void main(String []args)
{
B b=new B();
b.callme();
b.callmetoo();
}
}
fsl4faisal -4
Newbie Poster
Recommended Answers
Jump to PostThey're a tool to allow giving a class you define a type.
Jump to PostYes, there are many ways to do things. Some better than others
Jump to PostNo an interface doesn't contain code. An abstract class can have real methods that do something.
All 11 Replies
fsl4faisal -4
Newbie Poster
NormR1 563
Posting Sage Team Colleague
fsl4faisal -4
Newbie Poster
NormR1 563
Posting Sage Team Colleague
fsl4faisal -4
Newbie Poster
NormR1 563
Posting Sage Team Colleague
fsl4faisal -4
Newbie Poster
NormR1 563
Posting Sage Team Colleague
fsl4faisal -4
Newbie Poster
NormR1 563
Posting Sage Team Colleague
NP-complete 42
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.