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) {
String a = "java is easy to learn!";
String b = "java opens many opportunities!";
s = a+b;
int i;
for(i=0;i<=4;i++)
{
System.out.println(s);
}
}
}
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) {
String a = "java is easy to learn!";
String b = "java opens many opportunities!";
int i;
for(i=0;i<=4;i++)
{
System.out.println(s);
}
}
}