lab1
This commit is contained in:
17
DataLabs/lab1/Box.java
Normal file
17
DataLabs/lab1/Box.java
Normal file
@ -0,0 +1,17 @@
|
||||
public class Box<T> {
|
||||
|
||||
private T t;
|
||||
|
||||
public void set(T t){
|
||||
this.t = t;
|
||||
}
|
||||
|
||||
public T get(){
|
||||
return t;
|
||||
}
|
||||
|
||||
public String printContents(){
|
||||
return t.toString();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user