Advertisement
PRO_gramer

testye hashmap

Jun 29th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. import java.util.HashMap;
  2.  
  3. public class Teste {
  4. public static void main(String[] args){
  5.     HashMap<String, Pessoa> e = new HashMap<String, Pessoa>();
  6.      e.put("cpf : 54654464687", new Pessoa("Levi Ribeiro Silva"));
  7.      e.put("cpf : 56879487",new Pessoa("Joaquim valmir Silva"));
  8.      e.put("cpf : 541984654674", new Pessoa("Meque DonaldIS Pinto"));
  9.      
  10.      
  11.      System.out.println(e);
  12.      System.out.println(e.isEmpty());
  13.      System.out.println(e.size());
  14.     System.out.println(e.remove("cpf : ruye656879487"));
  15.    
  16.    
  17.      System.out.println(e);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement