Advertisement
Guest User

lesson 3

a guest
Feb 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1.  
  2. public class Lesson3 {
  3.  
  4. public static void main(String[] args) {
  5.  
  6.  
  7. //1
  8. String s = "The number of rabbits is ";
  9. int argh = 129;
  10. String report = s + argh;
  11. System.out.println(report + ".");
  12. //2
  13. String p = "Groovy Dude";
  14. System.out.println(p.toUpperCase());
  15. //4
  16. String c;
  17. String m = "The Gettysburg Address";
  18. c=m.substring(4);
  19. System.out.println(c);
  20. //5
  21. String b = "Four score and seven years ago, ";
  22. String b2 = b.substring(7, 12);
  23. System.out.println(b2);
  24. //7
  25. String m2 = "\"Look Here!\"";
  26. int x = m2.length();
  27. System.out.println(m2 + " has " + x + " characters.");
  28. //8
  29. String bigBoi = "\"good\"";
  30. System.out.println("All " + bigBoi + " men come to the aid of their country.");
  31.  
  32.  
  33.  
  34.  
  35. }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement