Advertisement
keviinrm7

ejercicio

Jun 3rd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. String saludo="Hola gay punkiesgamer";
  2. String tw = "Felicidades Richard Barker, Eres un crá";
  3.  
  4. //LENGHT
  5. int longitud = saludo.length();
  6. System.out.println(longitud);
  7.  
  8.  
  9. //BUSCAR CARACTERES
  10. System.out.println(tw.charAt(10));
  11.  
  12. //CONCATENAR/unir cadenas
  13. String v="450"+"450";
  14. double num= Double.parseDouble(v);
  15. System.out.println(10+num+"H");
  16.  
  17. v="chao";
  18. if(v.equals(v+100))
  19. {
  20. System.out.println("VERDADERO");
  21. }
  22. else
  23. {
  24. System.out.println("FALSO");
  25. }
  26.  
  27. //EXTRAER SUB CADENA
  28.  
  29. String ex= v.substring(1,6);
  30. System.out.println(ex);
  31.  
  32.  
  33.  
  34.  
  35.  
  36. }
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement