-1
所以这是我的代码中包含我的LinkedList的一部分。我如何在我的数字集中找到匹配项。如何匹配LinkedList中的索引值
LinkedList <Integer> mylist = new LinkedList<>();
for(int i : 1; i<=5; i++){
System.out.println("Process " + i + has :);
int numINPUT = scan.nextint();
mylist.add(numINPUT);
}
我所需的输出是:
Process 1 has : 3
Process 2 has : 4
Process 3 has : 1
Process 4 has : 5
Process 5 has : 2
Matched : Process 1 and Process 3.
这些数值来自哪里? –
请提供一些更多的说明。 –
我很好奇。你的代码如何编译? –