I have a ruby backround and im new to java i wrote a basic programm but somehow i get a error i cant fix! My code:
import java.util.ArrayList; public class Musi
You cannot access the arraylist like an array you have to use the method get(index) in order to get the i th element.
public void returnFiles(){ for(int i = 0;i< files.size() ; i++){ System.out.println( i + ". Ist: " + files.get(i)); } }