private static final Logger LOGGER = Logger.getLogger(AbstractDbClient.class);
protected Connection connection;
protected Connection connection;
private static final Logger LOGGER = Logger.getLogger(AbstractDbClient.class);
which order is better for field declareing? some books pointed that should order them by private/public/protected/etc, if base on this , the second code is better, but it seems looked bad. If incluse static final var or static var? which order rule is?
Personally I like all my statics at the top of a class and have all fields in public, protected, default, private order.
eg
I also tend to add a line between teh statics and non static fields.
But it is a matter of opinion. Perhaps ask your peers whom you work with. It’s better to be consistent on this sort of thing.