I\'m declaring a field:
private static final String filename = \"filename.txt\";
First, does the order of private static final
private static final
No. But that is the sequence I usually see used.
It's a reasonable choice, but some would prefer a configuration file, either Properties or another file format (e.g. XML). That way, you can change the filename without recompiling.