Clubs
2013-07-31 18:54:55 UTC
Write a complete Java program in a class named Mantra that produces the following output. Remove its redundancy by adding a method.
There's one thing every coder must understand:
The System.out.println command.
There's one thing every coder must understand:
The System.out.println command.
Here is what I think the answer is:
public class Mantra {
public static void main (Strings args[]){
printstatement1();
printstatement2();
printstatement1();
printstatement2();
}
public static void statement1 {
System.out.println("There's one thing every coder must understand:");
System.out.println("The System.out.println command.");
}
}
However, the website I am doing this program on tells me that there is an error so can anyone tell me what I am doing wrong and what the correct program would be. Thank you for any help you can offer.