This tip is a follow-up to the tip Retrieving the ID of the Last Inserted Record. In that tip, the SELECT command is longer than it needs to be. Here’s
Static fields have class-level scope, so they can execute even without a main() method. Here’s an example: public class Static{ static{System.out.println(“I will print without main()”);}}