我曾尝试下面的程序,我坚持请协助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