Advertisement
Felanpro

arrays as parameters

Sep 22nd, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.26 KB | None | 0 0
  1. public class class1
  2. {
  3.     //static class2 x = new class2();
  4.    
  5.     public static void main(String[] args)
  6.     {
  7.         int z[] = {12, 45, 67};
  8.         m(z);
  9.     }
  10.    
  11.     public static void m(int[] x)
  12.     {
  13.         for(int y = 0; y < x.length; y++)
  14.         {
  15.             System.out.print(x[y]);
  16.         }
  17.     }
  18.    
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement