Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. public class Princial {
  2.  
  3.     private static int opcao;
  4.  
  5.     public static void main(String[] args, ContaBancaria Conta1, ContaEspecial Conta2, ContaNormal Conta3) {
  6.  
  7.         switch (opcao) {
  8.             case 1:
  9.                 Conta1 = new ContaBancaria();
  10.             case 2:
  11.                 Conta2 = new ContaEspecial();
  12.                 break;
  13.  
  14.             case 3:
  15.                 Conta3 = new ContaNormal();
  16.                 break;
  17.             default:
  18.                 System.out.println("Opção inválida");
  19.         }
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement