Advertisement
hombretao

validarHorario

Sep 23rd, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1.  public boolean validarHorario(String hA, String hC){
  2.        
  3.         if(hA.length() == 5){
  4.         String apertura = hA.substring(0,1);
  5.         int a = Integer.parseInt(apertura);
  6.         String cierre = hC.substring(0,1);
  7.         int c = Integer.parseInt(cierre);
  8.        
  9.         if(c > a) return true;
  10.         }
  11.         return false;
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement