Guest User

Untitled

a guest
Jul 26th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. import javax.swing.JOptionPane;
  2. import java.util.Scanner;
  3. public class SwitchCondicional{
  4. public static void main(String[]args){
  5.  
  6. Scanner entrada = new Scanner(System.in);
  7.  
  8. String tecnologia;
  9.  
  10. JOptionPane.showInputDialog(null,"Informe a tecnologia a ser usada: ");
  11.  
  12. tecnologia = entrada.nextLine();
  13.  
  14.  
  15. switch(tecnologia){
  16. case "Java":
  17. case "C":
  18. case "C++":
  19. JOptionPane.showMessageDialog(null,"Linguagem de programacao !");
  20. break;
  21.  
  22. case "Oracle":
  23. case "MySQL" :
  24. case "PostgreSQL":
  25. JOptionPane.showMessageDialog(null,"Banco de Dados !");
  26. break;
  27.  
  28. case "PHP":
  29. case "JavaScript":
  30. case "HTML":
  31. JOptionPane.showMessageDialog(null,"Programacao Web !");
  32. break;
  33.  
  34. default:
  35. JOptionPane.showMessageDialog(null,"Tecnologia desconhecida !");
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment