Given below the sample code :
public static void addition(List list) {
list.add("0021");
}
public static void main(String[] args) {
List<Integer> myList = new ArrayList<Integer>();
addition(myList);
System.out.println(myList.get(0));
}
What will be the output of the above code ?
1. 21(2)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.