Advertisement
Blonk

Untitled

Feb 18th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. public class Main {
  2.  
  3.     public static void main(String[] args) {
  4.  
  5.         int [] myList;
  6.         myList = new int [10];
  7.  
  8.         int slot = 0;
  9.  
  10.  
  11.  
  12.         for (int i = 0; i < myList.length; i++){
  13.             myList[i] = -113;
  14.             System.out.println("The slot " + slot + " contains a: " +myList[i]);
  15.             slot = slot + 1;
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement