ulvis.paste.net - pastebin

Paste Search Dynamic
Recent pastes
printArgs
  1. /* package whatever;
  2. // don't place package name!
  3. */
  4.  
  5.  
  6.  
  7. import java.util.*;
  8.  
  9. import java.lang.*;
  10.  
  11. import java.io.*;
  12.  
  13.  
  14.  
  15. /* Name of the class has to be "Main" only if the class is public. */
  16.  
  17.  
  18. class Main
  19.  {
  20.  
  21.     public static void printArgs(int... x) {
  22.         for(int i = 0; i < x.length; i++) {
  23.  
  24.             system.out.println(x[i]);
  25.  
  26.         }
  27.     }
  28.  
  29.     public static void main (string[] args) throws java.lang.exception
  30.  {
  31.  
  32.         int[] arg = new int[] {1, 2, 3};
  33.         printArgs(arg);
  34.     }
  35.  
  36. }
Parsed in 0.009 seconds