Advertisement
cesarnascimento

vetor exemplo basico 4 array em ordem

May 15th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.25 KB | None | 0 0
  1. package vetor;
  2.  
  3. import java.util.Arrays;
  4.  
  5. public class vetor {
  6.  
  7.     public static void main(String[] args) {
  8.  
  9.         double v[] = {3.5, 2.75, 9, -4.5};
  10.         Arrays.sort(v);
  11.         for (double valor : v){
  12.             System.out.print(valor+ " ");
  13.         }
  14.        
  15.     }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement