Write a java program to demonstrate the implementation of abstract class. | VCMIT

Implementation of Abstract Class.



INPUT

import java.util.Scanner;
abstract class test
{
abstract void get();
}
class test1 extends test
{
void get()
{
int a,b;
Scanner ob=new Scanner(System.in);
System.out.print("Enter 1st Number: ");
a=ob.nextInt();
System.out.println("Enter 2st Number: ");
b=ob.nextInt();
System.out.println("Addition is: "+(a+b));
}
}
class prac4C
{
public static void main(String args[])
{
test1 obj=new test1();
obj.get();
}
}

OUTPUT



Disqus Comments
TheWaoFam. Powered by Blogger.

Total Pageviews

Search This Blog

  • ()

Random Posts

randomposts

Recent Posts

recentposts

Footer Link

Connected

Facebook

banner image

Most Recent

Contact Form

Categories

There are many variations of passages of Lorem Ipsum available.

About Me

Hi there, I’m Amanda – a girl love fashion and love to express herself with her own sense of style.

Trending