Created
March 17, 2020 16:10
-
-
Save DeveloperArthur/9909a44d87fca5e4aa70ac2a8a31302f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.meubuscadordecep.cliente; | |
import br.com.meubuscadordecep.dominio.Endereco; | |
import br.com.meubuscadordecep.viacep.ServicoDeCep; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) throws Exception { | |
System.out.print("Informe seu CEP: "); | |
String cep = new Scanner(System.in).nextLine(); | |
Endereco endereco = ServicoDeCep.buscaEnderecoPelo(cep); | |
System.out.println("Logradouro: " + endereco.getLogradouro()); | |
System.out.println("Bairro: " + endereco.getBairro()); | |
System.out.println("Localidade: " + endereco.getLocalidade()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment