package com; public class Box <T>{ private T t; public T getT() { return t; } public void setT(T t) { this.t = t; } }
public static void main(String[] args) { Box<String> s=new Box<String>(); s.setT("Hello"); System.out.println(s.getT());; }
package com; public class Box <T>{ private T t; public T getT() { return t; } public void setT(T t) { this.t = t; } }
public static void main(String[] args) { Box<String> s=new Box<String>(); s.setT("Hello"); System.out.println(s.getT());; }