Just Try this code in Java Playgound :
public class Profile {
public static void main(String[] args) {
String name = "Rohesa Sidiq Permana";
String[] interestedIn = {"PHP","Java","JavaScript","Dart"};
String[] learning = {"PHP","Java","PostgreSQL","MySQL","HTML","CSS","JavaScript","Dart"};
System.out.println(" Hi, I'm " + name + "\n");
System.out.print(" I'm interested in ");
for (int i = 0; i < interestedIn.length; i++) {
if ( i < (interestedIn.length - 1)) System.out.print(interestedIn[i]+", ");
if ( i == (interestedIn.length - 1)) System.out.print("And "+interestedIn[i]+" \n");
}
System.out.print("\n I'm currently learning ");
for (int i = 0; i < learning.length; i++) {
if ( i < (learning.length - 1)) System.out.print(learning[i]+", ");
if ( i == (learning.length - 1)) System.out.print("And "+learning[i]+" \n");
}
}
}