Advertisement
MrsMcLead

Untitled

Mar 4th, 2015
785
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. public class forLoop{
  2.   public static void main(String[] args)
  3.   {
  4.     int[]test = {8,3,5,4,5,6,3,5,4,7};
  5.     String output="";
  6.     for(int k=0; k<test.length; k++)
  7.     {
  8.       output+="number " + k + " :: " +test[k]+"\n";
  9.     }
  10.     System.out.println(output);
  11.    
  12.   }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement