Skip to content

Commit a8c3b1d

Browse files
Update inheritance.java
1 parent 95f8f7e commit a8c3b1d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

inheritance.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
class animal{
2-
void dog(){
1+
class animal
2+
{
3+
void dog()
4+
{
35
System.out.println("bark");
46
}
57
}
@@ -13,8 +15,10 @@ void birds(){
1315
System.out.println("fly");
1416
}
1517
}
16-
public class inheritance {
17-
public static void main(String[] args) {
18+
public class inheritance
19+
{
20+
public static void main(String[] args)
21+
{
1822
air a1 =new air();
1923
a1.dog();
2024
a1.fish();

0 commit comments

Comments
 (0)