Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Princial {
- private static int opcao;
- public static void main(String[] args, ContaBancaria Conta1, ContaEspecial Conta2, ContaNormal Conta3) {
- switch (opcao) {
- case 1:
- Conta1 = new ContaBancaria();
- case 2:
- Conta2 = new ContaEspecial();
- break;
- case 3:
- Conta3 = new ContaNormal();
- break;
- default:
- System.out.println("Opção inválida");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement