SHARE
TWEET

Untitled

a guest Oct 16th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Main {
  2.  
  3.     private static String nome = "Pedro";
  4.  
  5.     public static void main(String[] args) {
  6.         String nome = "Ana";
  7.  
  8.         System.out.println(nome);
  9.  
  10.         System.out.println();
  11.         System.out.println("========");
  12.         System.out.println();
  13.  
  14.         String[] nomes = new String[2];
  15.         nomes[0] = "Ana";
  16.         nomes[1] = "Vitor";
  17.  
  18.         for (int i = 0; i < nomes.length; i++) {
  19.             System.out.println(nomes[i]);
  20.         }
  21.  
  22.         System.out.println();
  23.         System.out.println("========");
  24.         System.out.println();
  25.  
  26.         String[][] nomesEIdades = new String[2][2];
  27.  
  28.         nomesEIdades[0][0] = "Ana";
  29.         nomesEIdades[0][1] = "26";
  30.         nomesEIdades[1][0] = "Vitor";
  31.         nomesEIdades[1][1] = "29";
  32.  
  33.         for (int line = 0; line < nomesEIdades.length; line++) {
  34.  
  35.             for (int column = 0; column < nomesEIdades[line].length; column++) {
  36.                 System.out.println(nomesEIdades[line][column] + " ");
  37.             }
  38.  
  39.             System.out.println();
  40.         }
  41.  
  42.     }
  43.  
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top