I'm really new to java and slowly learning so not sure if there is an obvious way to do this but I basically have two lists that I want to merge together to form a single list.
The python code for this, uses a function called zip. Say I have list1 = 1,2,3,4,5
and list2= 6,7,8,9,10
..Then I want to make a new list with something like new_list = (1,6), (2,7), (3,8), (4,9), (5,10)
.
I found a question that had a similar problem but I don't want to use an external library and would rather learn how to create this function myself.