Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. String string = "hello_World_Hi";
  2. String s = "_";
  3. int length = string.length();
  4. char c = ' ';
  5.  
  6. if (string.contains(s))
  7. {
  8. for (int i = 0; i < length; i++)
  9. {
  10. if (string.charAt(i) == '_')
  11. {
  12. if (true)
  13. {
  14. c = string.charAt(i+1);
  15. }
  16. }
  17. }
  18. }
  19.  
  20. if (Character.isUpperCase(c))
  21. {
  22. c = Character.toLowerCase(c);
  23. }
  24. System.out.println(c);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement