I have a class here that contains only methods static, so I call it a helper class, for example:
public class FileUtils {
public static String readFileEntry(final Path path, final String entryKey) throws IOException { }
public static String readAndModifyFileEntry(final Path path, final String entryKey, final UnaryOperator<String> operator) throws IOException { }
}
How to declare a class ( abstract, final, staticetc.), it is impossible to create an instance of the class? How you should not do it.
If this is not possible, then what is the best practice?
I am using Java 8 if this helps.
source
share