I suppose that the error is that in the screen to the last one a line appears although empty is a line, but with the principal method calling the print method twice I do not know how to achieve only 4 lines
package com.codegym.task.task02.task0201;
/*
Implement the print method
*/
public class Solution {
public static void main(String[] args) {
print("Java is easy to learn!");
print("Java opens many opportunities!");
}
public static void print(String s) {
System.out.print("Java is easy to learn! ");
System.out.println("Java opens many opportunities!");
System.out.print("Java is easy to learn! ");
System.out.println("Java opens many opportunities!");
}
}