added program 9B

also changed the name of screenshot program 9 to program 9A
This commit is contained in:
2026-02-05 14:07:11 +05:30
parent 8b07a727b4
commit 9042b245ec
3 changed files with 18 additions and 0 deletions

18
AreaG.java Normal file
View File

@@ -0,0 +1,18 @@
// 9B
public class AreaG<T> {
private T t;
public void add(T t){
this.t = t;
}
public T get() {
return t;
}
public static void main(String[] args){
AreaG<Integer> rectange = new AreaG<Integer>();
AreaG<Double> circle = new AreaG<Double>();
rectange.add(10);
circle.add(2.5);
System.out.println(rectange.get());
System.out.println(circle.get());
}
}

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
Screenshots/program9B.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB