In IDE Some public methods are marked with a warning as Access can be package local
and if I remove public
form the method no warning will be shown.
Is it a good practice to do so? Should I keep them public anyways ?
If the method is only accessed within the package, the best practice is to use the "default" access modifier (by not specifying any access modifier). Further more briefly here are the four access modifiers used in Java and there accessibility levels.