Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1.  
  2. public class StringTask {
  3.  
  4. public static void main(String[] args) {
  5. String toModify = "git is a <<version control>> system for tracking changes in <<computer files>> and coordinating work on those files among multiple people";
  6. System.out.println(toModify.indexOf("<"));
  7. System.out.println(toModify.indexOf(">"));
  8. System.out.println(toModify.lastIndexOf("<"));
  9. System.out.println(toModify.lastIndexOf(">"));
  10. toModify = toModify.substring(0,9)+toModify.substring(11,26).toUpperCase()+toModify.substring(28,60)+toModify.substring(62,76).toUpperCase()+toModify.substring(78);
  11. // write your code here
  12.  
  13. System.out.println(toModify.equals("git is a VERSION CONTROL system for tracking changes in COMPUTER FILES and coordinating work on those files among multiple people"));
  14. }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement