我曾嘗試下面的程序,我堅持請協助me.Below是我的程序如何查找重複/重複數組值並將其顯示在輸出中?
import java.util.ArrayList;
public class PrintNosandRepetition
{
public static void main(String[] args)
{
int a[] = new int[] {1,3,4,5,6,3,2,4,6,7,9,4,12,3,4,6,8,9,7,6,43,2,4,7,7,5,2,1,3,4,6,311,1};
for (int i=0; i< a.length; i++){
System.out.print(a[i]+ " ");
}
for (i=1, j<a.length; j++)
}
輸出必須是時尚「1重複3次」 .etc
如果您規範化數據集,例如先排序吧 – Madbreaks