Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a6e2d41

Browse files
inheritance program added
1 parent 5b5b6f9 commit a6e2d41

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed
805 Bytes
Binary file not shown.
1.09 KB
Binary file not shown.

‎11_OOPs/OOPs3/Intro/Inheritancetwo.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
public class Inheritancetwo {
2-
2+
public static void main(String[] args) {
3+
Inheritanceone box = new Inheritanceone();
4+
System.out.println(box.l + " " + box.w + " " + box.h);
5+
6+
Inheritanceone box2 = new Inheritanceone(4);
7+
System.out.println(box2.l + " " + box2.w + " " + box2.h);
8+
9+
Inheritanceone box3 = new Inheritanceone(4.5, 5.5, 6.5);
10+
System.out.println(box3.l + " " + box3.w + " " + box3.h );
11+
12+
13+
}
314
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /