Absolutely. The problem statements can be slightly rephrased: "Write a Java program for ..... Ensure to declare a public class for calling the main method."
Forum
Question Authors' Forum
Java questions
This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 5 posting(s) in 1 day