What will be the output of the following code?
import java.util.*;
public class Test
{
public static void main (String args[]) throws Exception
{
List l = new ArrayList ();
int a = (int)(3 * 2.5);
for (int i = 0; i < 10; i++)
l.add (i);
String s = "Hello";
l.add (a, s.getBytes ("UTF-8")[2]);
System.out.println (l);
}
}
Correct Answer: [0, 1, 2, 3, 4, 5, 6, 108, 7, 8, 9]
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Java MCQ Questions