Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyJava { //create the class
- public static void main(String[] args) { //start the script
- String sentence = "I learnt this script from watching a 10-minute video lol"; //a string
- System.out.println(sentence.toUpperCase()); //prints I LEARNT THIS SCRIPT FROM WATCHING A 10-MINUTE VIDEO LOL
- }
- public static void addExclamationPoint(String sentence) { //create the method
- System.out.println(sentence + "!") //prints I LEARNT THIS SCRIPT FROM WATCHING A 10-MINUTE VIDEO LOL!
- }
- } //ends the script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement