Advertisement
cesarnascimento

array fill

May 15th, 2017
78
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.         int v[] = new int[20];
  10.         Arrays.fill(v, 0);
  11.         for (int valor:v){
  12.             System.out.println(valor);
  13.         }
  14.     }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement