Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String string = "hello_World_Hi";
- String s = "_";
- int length = string.length();
- char c = ' ';
- if (string.contains(s))
- {
- for (int i = 0; i < length; i++)
- {
- if (string.charAt(i) == '_')
- {
- if (true)
- {
- c = string.charAt(i+1);
- }
- }
- }
- }
- if (Character.isUpperCase(c))
- {
- c = Character.toLowerCase(c);
- }
- System.out.println(c);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement