Enter, compile, and run the following program: public class Test OpenCurlyBracket public static void main OpenParenthesis
Question:
Enter, compile, and run the following program:
public class Test
OpenCurlyBracket
public static void main OpenParenthesis String OpenSquareBracket CloseSquareBracket args CloseParenthesis
OpenCurlyBracket
System.out.println OpenParenthesis double quotes An Emergency Broadcast double quotes CloseParenthesis semicolon
CloseCurlyBracket
CloseCurlyBracket
PP 1.2Introduce the following errors, one at a time, to the program from PP 1.1. Record any error messages that the compiler produces. Fix the previous error each time before you introduce a new one. If no error messages are produced, explain why. Try to predict what will happen before you make each change.
change Test to test
change Emergency to emergency
remove the first quotation mark in the string
remove the last quotation mark in the string
change main to man
change println to bogus
remove the semicolon at the end of the println statement
remove the last brace in the program
PP 1.3Write a program that prints, on separate lines, your name, your birthday, your hobbies, your favorite book, and your favorite movie. Label each piece of information in the output.
PP 1.4Write a program that prints a list of four or five Web sites that you enjoy. Print both the site name and the URL.
PP 1.5Write a program that prints the first few verses of a song (your choice).
Programmers Guide To Java SE 8 Oracle Certified Associate OCA
ISBN: 9780132930215
1st Edition
Authors: Khalid Mughal, Rolf Rasmussen