I'm using this online Java compiler for my project, and I'm encountering unexpected behavior in the execution of my code. Here's a simplified snippet:
Code:
import java.util.ArrayList;
public class Main { Â Â public static void main(String[] args) { Â Â Â Â ArrayList<String> fruits = new ArrayList<>(); Â Â Â Â fruits.add("Apple"); Â Â Â Â fruits.add("Banana"); Â Â Â Â fruits.add("Orange");
    for (String fruit : fruits) {       System.out.println(fruit.length());     }   } }
Despite the seemingly straightforward code, I'm not getting the expected output. What could be causing this issue with the online Java compiler, and how can I rectify it to ensure proper code execution and output?