Comment Comment by Tiomaidh For debugging via print statements: public int echo(int x, String name) { System.out.println(name + ":\t" + x); return x; } (I also have versions with only x as an argument, and with the other types).In use: this.setPreferredSize(new Dimension(getPreferredSize.getWidth(), echo(getViewportHeight(itemCount), "Viewport")); In addition to sparing me from System.out.println verbosity, it's really useful in situations like the above where the value you want to print isn't bound to a variable. parent Tiomaidh 15 years ago
In use:
In addition to sparing me from System.out.println verbosity, it's really useful in situations like the above where the value you want to print isn't bound to a variable.