What does the following line of code do? System.out.println(); A. Breaks your computer.
Question:
What does the following line of code do?
System.out.println();
A. Breaks your computer. Do not write this line of code into your program!
B. Nothing happens because you need to write something between the parentheses, for example: System.out.println("hello!");
C. Causes an error because you need to write something between the parentheses, for example: System.out.println("hello!");
D. Prints an empty line. This is helpful for spacing things out when printing multiple things.
2. You are required to download jGrasp for this class. What is it used for?
(Check all that apply, or none if applicable.)
A. Asking the instructor for help with my program
B. Compiling my Java program
C. Debugging my Java program
D. Submitting my program to the instructor for grading
E. Editing my Java program
3. Match the escape sequence to what it does.
Choices - use a choice only once
A. t
B.
C. q
D. "
E.
Match each of the following to a choice
1. Lets you print a quotation mark
2. Lets you print a backslash
3. This isn't an escape sequence!
4. Moves to the next line
5. Equivalent to pressing the tab key
4. Are there any mistakes in the following Java code?
public class PrintMyName {
public static void main(String() args) {
// Prints name
System.out.println("My name is Elmo.";
}
}
A. Yes, there is one mistake.
B. Yes, there are two mistakes.
C. Yes, there are three mistakes.
D. No, there are no mistakes in this code.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill