Advertisement
marina7x

Untitled

May 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.00 KB | None | 0 0
  1. public class prova {
  2.  
  3.     public static final String LLIBRE = "llibre";
  4.     public static final String DOC = "documentació";
  5.     public static final String VIDCER = "vidre o ceramica";
  6.  
  7.     public static void main(String[] args) {
  8.  
  9.         String tipus = "";
  10.  
  11.         boolean a_la_caixa_petita = true;
  12.         boolean portaho_tu = true;
  13.         boolean embolicar_amb_paper = true;
  14.         boolean a_la_caixa_gran = true;
  15.  
  16.         if (tipus == LLIBRE) {
  17.             a_la_caixa_petita = true;
  18.             System.out.print("Cal posar-ho a la caixa petita \n");
  19.  
  20.         } else if (tipus == DOC) {
  21.             portaho_tu = true;
  22.             System.out.print("No ho posis a la caixa. Porta-ho tu \n");
  23.  
  24.         } else if (tipus == VIDCER) {
  25.             embolicar_amb_paper = true;
  26.             System.out.print("Cal embolicar abans amb paper \n");
  27.  
  28.         } else {
  29.             a_la_caixa_gran = true;
  30.             System.out.print("Cal posar-ho a la caixa gran \n");
  31.         }
  32.  
  33.     }
  34.    
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement