Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. public class Main {
  2.  
  3.     public static void main(String[] args) {
  4.        
  5.         Integer[] iray = {1, 2, 3, 4};
  6.         Character[] cray = {'b', 'u', 'c', 'y'};
  7.        
  8.         printMe(iray);
  9.         printMe(cray);
  10.        
  11.     }
  12.  
  13.     public static void printMe(Object[] obj) {
  14.         for (Object o : obj)
  15.             System.out.printf("%s ", o);
  16.         System.out.println();
  17.     }
  18.    
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement