问题描述
我正在尝试使用 public class question{
public static void main(String[] args) {
int[] array = {33,33,44,5,6,7};
for (int i = 0; i < array.length-1; i++) {
for (int j = i + 1; j < array.length-1; j++) {
if (array[j] == array[i]) // comparing for similarity
{
int insertPosition = i+2;
int insertValue = 2;
insertX(array.length,array,insertValue,insertPosition);
}
else{
int one = 1;
int position
insertX(array.length,one,position);
}
}
System.out.println(Arrays.toString(array));
// The output should be "33,2,1,7,1"
}
System.out.println(Arrays.toString(array));
}
public static int[] insertX(int n,int arr[],int x,int pos)
{
int i;
int newarr[] = new int[n + 1];
// insert the elements from
// the old array into the new array
// insert all elements till pos
// then insert x at pos
// then insert rest of the elements
for (i = 0; i < n + 1; i++) {
if (i < pos - 1)
newarr[i] = arr[i];
else if (i == pos - 1)
newarr[i] = x;
else
newarr[i] = arr[i - 1];
}
return newarr;
}
}
在 Row
中隐藏一些图标,但我不明白为什么这些图标总是保留在那里,而其他小部件会与 {{1} 一起隐藏}.
这是我的代码:
AnimatedContainer
知道我在这里做错了什么吗?
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)