kingrunes

Helping people...

Aug 20th, 2012
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. package king.testing;
  2.  
  3. public class Main {
  4.     public static void main(String[] args){
  5.         Object[] results = getIntAndBoolean();
  6.         int first = 0;
  7.         boolean second = false;
  8.         for(int i = 0; i<results.length; i++){
  9.             first = (int) results[i];
  10.             second = (boolean) results[i];
  11.         }
  12.         System.out.println("int: "+first+" boolean: "+second);
  13.     }
  14.    
  15.     public static Object[] getIntAndBoolean(){
  16.         return new Object[]{ 4, true };
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment