Not able to see complete error message in Your Output

Only this much error message is visible.

Exception in thread “main” java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(
at java.base/jdk.internal.util.Preconditions.checkIndex(
at java.base/java.util.Objects.checkIndex(
at java.base/java.util.ArrayList.get(
at DiameterOfTree.diameterOf

Is this the output from your assessment?

yes, exactly as shown in the window when clicked on Run Code

Were you able to resolve this? If not I suggest you to run it from your terminal directly so that you can scroll through the output.

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.