public class StoreSomethingStrMain { public static void main(String[] args) { StoreSomethingStrCon a = new StoreSomethingStrCon("I'm a String"); System.out.println(a.get()); a.set("new String"); System.out.println(a.get()); StoreSomethingStr b = new StoreSomethingStr(); b.set("I'm var b"); System.out.println(b.get()); b.set("new b"); System.out.println(b.get()); } }