We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acfd9d2 commit 858954bCopy full SHA for 858954b
abstraction.java
@@ -1,19 +1,25 @@
1
-abstract class shape{
+abstract class shape
2
+{
3
abstract void draw();
4
}
-class rectangle extends shape{
5
- void draw(){
+class rectangle extends shape
6
7
+ void draw()
8
+ {
9
System.out.println("rectanle is drawn");
10
11
12
class circle extends shape{
13
14
15
System.out.println("circle is drawn");
16
17
18
-public class abstraction {
- public static void main(String[] args) {
19
+public class abstraction
20
21
+ public static void main(String[] args)
22
23
shape s1=new circle();
24
s1.draw();
25
0 commit comments