Guest User

Untitled

a guest
Feb 18th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public static void main(String[] args)
  2. {
  3. int[] arrayint={1,2,3,4,5};
  4. float[] arrayfloat={1,2,3,4,5};
  5. boolean[] arrayboolean={true,false,true,false,true};
  6. short[] arrayshort={1,2,3,4,5};
  7. char[] arraychar={'a','b','c','d','e'};
  8. String imprimir="";
  9.  
  10. for(int i=0;i<5;i++){
  11. imprimir+="dato int:"+Integer.toString(arrayint[i])
  12. +" dato float:"+Float.toString(arrayfloat[i])
  13. +" dato boolean:"+Boolean.toString(arrayboolean[i])
  14. +" dato short:"+Short.toString(arrayshort[i])
  15. +" dato char:"+Character.toString(arraychar[i])+"n";
  16. }
  17.  
  18. System.out.print(imprimir);
  19.  
  20. }
Add Comment
Please, Sign In to add comment