Hi! I don't want to look up the answer because then cheating doesn't teach me anything. Please assist. I keep getting:
"com/codegym/task/task02/task0201/Solution.java:11: error: method print in class com.codegym.task.task02.task0201.Solution cannot be applied to given types;
print();
^
required: java.lang.String
found: no arguments
reason: actual and formal argument lists differ in length"
package com.codegym.task.task02.task0201;
/*
Implement the print method
*/
public class Solution {
public static void main(String[] args) {
for(int a=0; a<4; a++){
print();
}
}
public static void print(String s) {
//write your code here
System.out.println("Java is easy to learn!");
System.out.println("Java is object-oriented!");
System.out.println("Java is platform-independent!");
}
}
package com.codegym.task.task02.task0201;
/*
Implement the print method
*/
public class Solution {
public static void main(String[] args) {
for(int a=0; a<4; a++){
print();
}
}
public static void print(String s) {
//write your code here
System.out.println("Java is easy to learn!");
System.out.println("Java is object-oriented!");
System.out.println("Java is platform-independent!");
}
}