public class MainTemplate { // Note that we pass the args array on, just incase you want it. public MainTemplate(String args[]) { IntStorage store = new IntStorage(); store.setData(10); System.out.println(store.getData()); } public static void main (String args[]) { // Note that we don't label the object, as we'll never need to // refer to it again. new MainTemplate(args); } }