I don't understand it mean?
Who can help me explain it?Thanks in advance!
for example this programe:

public class score{
public static void main(String args[]){
  int a[]={90,98,97,67,89,68,76,69,96,66},sum=0;
  double ave;
  for(int i=0;i<a.length;i++)sum+=a[i];
  ave=sum/10.0;
  System.out.println("Average="+ave);
  for(int s:a)System.out.printf("%4d",s);
  System.out.println();
  for(int s:a)System.out.print("%4d",(s-(int)ave));
  }
}
for (int s:a)

is shorthand for

for (int s=0; s<a; s++)

in Java. I'm not sure if you can use printf statements like the ones you have there though - that's a C++ thing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.