Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Lesson3 {
- public static void main(String[] args) {
- //1
- String s = "The number of rabbits is ";
- int argh = 129;
- String report = s + argh;
- System.out.println(report + ".");
- //2
- String p = "Groovy Dude";
- System.out.println(p.toUpperCase());
- //4
- String c;
- String m = "The Gettysburg Address";
- c=m.substring(4);
- System.out.println(c);
- //5
- String b = "Four score and seven years ago, ";
- String b2 = b.substring(7, 12);
- System.out.println(b2);
- //7
- String m2 = "\"Look Here!\"";
- int x = m2.length();
- System.out.println(m2 + " has " + x + " characters.");
- //8
- String bigBoi = "\"good\"";
- System.out.println("All " + bigBoi + " men come to the aid of their country.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement