This program is showing compile time error.. illegal start of type for (Integer it : arr), why it showing error?

前端 未结 0 415
走了就别回头了
走了就别回头了 2020-12-19 16:46

import java.util.*; class Test { Set st = new HashSet();

Integer arr[]={1,1,2,2,4,8};

for (Integer it : arr)
{
    st.add(it);
    System.out.println(st);
}
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题