public class Mix4 {
int counter=0;
public static void main(String[] args)
{
int count=0;
Mix4[] m4a=new Mix4[20];
int x=0;
while(x<9){
m4a[x]=new Mix4();
m4a[x].counter=m4a[x].counter+1;

展开全部
收起
1回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • 情深深

    1人对此回答表示赞同

    从头到尾看,System.out.println(count+" "+m4a[1].counter);
    每一个数组元素的counter默认为0
    在 m4a[x].counter=m4a[x].counter+1变1

    对于m4a[0]到m4a[4]的元素 重新new一次 counter归0
    m4a[1].counter=1;
    简而言之 m4a 的元素为
    m4a [] 0 1 2 3 4
    展开
    1
    0回复
    发布于 6年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部