Java solutions to problems of various scope