CS

¡Supera tus tareas y exámenes ahora con Quizwiz!

question: Question 93 Question 931 pts The function of the assignment operator (=) is a to process.

right left

question: Question 94 Question 941 pts Write the ASCII value for that character in the blank. "a" = [___]

97

question: Question 72 Question 721 pts Which of the following is NOT part of an initialization statement in Java?

= sign data type value colon identifier

question: Question 96 Question 969 pts Match the operator with the operation.

== comparison for equality * multiplication - subtraction / division + addition % modulus != comparison for inequality = assignment + concatenation

question: Question 80 Question 801 pts Which of the following statements is true?

A primitive contains the value in a memory location An object contains a value A primitive can contain two values simultaneously An object contains the reference of a value

question: Question 8 Question 81 pts In the program shown below, select the choice that best describes the error in this program, if any. 1. public class Hello { 2. public static void main (String [] args) { 3. System.out.println("Hello, World"); 4. }

Line 3 - Lexical Line 4 - Lexical No error Line 3 - Syntax Line 4 - Syntax Line 4- Syntax

question: Question 37 Question 371 pts In the output statement, System.out.println("\n \t \\ \""); the underlined portion will cause a:

line feed " to appear in the output tab jump \ to appear in the output tab jump

question: Question 61 Question 611 pts Which of the following is NOT a correct pairing of data types and number of bits of storage required?

long = 64 bits byte = 4 bits double = 64 bits int = 32 bits char = 16 bits byte = 4 bits

question: Question 36 Question 361 pts The primary "block" or method inside any Java program is the ___________ block.

main output class method main

question: Question 20 Question 201 pts Select the choice that best fills <blank9> in the program listed below. <blank1> blank2> Hello { <blank3> <blank4> blank5> <blank6>(<blank7> [] args) { <blank8>.out.<blank9>("Hello, World!"); } }

println static main System String println

question: Question 6 Question 61 pts Select the choice that best fills <blank3> in the program listed below. <blank1> blank2> Hello { <blank3> <blank4> blank5> <blank6>(<blank7> [] args) { <blank8>.out.<blank9>("Hello, World!"); } }

public class void static main public

question: Question 11 Question 111 pts Select the choice that best fills <blank4> in the program listed below. <blank1> blank2> Hello { <blank3> <blank4> blank5> <blank6>(<blank7> [] args) { <blank8>.out.<blank9>("Hello, World!"); } }

public static void class main static

question: Question 29 Question 291 pts In the output statement, System.out.println("\n \t \\ \""), the underlined portion will cause a:

" to appear in the output \ to appear in the output tab jump line feed \ to appear in the output

question: Question 125 Question 1251 pts Consider the following code: int c = 3 - 37 % 2; System.out.println(c); What is output?

-18 2 3 0 15.5

question: Question 118 Question 1181 pts Consider the following code: int x = -3; x--; System.out.println(x); What is output?

-4 -2 -3 2 4

question: Question 120 Question 1201 pts What is output by the following code? int a = 91; System.out.println(a / 2);

44 45 45.5 46 46.5

question: Question 126 Question 1261 pts Consider the following code: int x = 9; int y = 6; System.out.println( (x*y)/x ); What is output?

6 9 54 36 81

question: Question 114 Question 1141 pts How many different values will be output by the code segment shown below? int x = 0; while (x < 20) { System.out.println(x); x += 3; }

8 5 9 7 6

question: Question 129 Question 1291 pts The following code is intended to input three integers and print the average. What is a potential problem with the code as written? System.out.println("Please enter three integers: "); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); System.out.println("The average is: " + (a + b + c) / 3);

It needs a cast so that the decimal portion will be shown. No correction needed, the code will work as written. It should be divided by 2, not 3. It should use scan.nextDouble instead of scan.nextInt. The parentheses are not needed and will cause a mathematical error.

question: Question 124 Question 1241 pts Which of the following correctly stores the word umbrella in a variable called stuff?

String umbrella = "stuff"; String "stuff" = "umbrella"; String stuff = umbrella; String stuff = "umbrella"; String umbrella = stuff;

question: Question 117 Question 1171 pts Assuming that scan is a properly initialized Scanner variable, which of the following correctly inputs a String?

String val = scan.nextValue(); String val = scan.nextInt(); String val = scan.nextDouble(); String val = nextDouble(); String val = scan.nextLine();

question: Question 135 Question 1351 pts Which of the following will print the ones column of an integer stored in x?

System.out.print(10 % x); System.out.print(x % 1); System.out.print(x % 10); System.out.print(x / 10); None of the items listed.

question: Question 89 Question 891 pts What is output by the code segment shown below? double dub = 'a'; String str = "Alpha"; System.out.println(dub + str);

aAlpha 97.0Alpha 70.0 65.0Alpha No output due to error 97.0Alpha

question: Question 42 Question 421 pts All parameters of the printf method after the first parameter are called ____________.

arguments headers format specifiers format strings arguments

question: Question 119 Question 1191 pts Which of the following data types would be most appropriate to use when recording whether a switch is in the "on" or "off" position?

boolean int double String None of the items listed could be used

question: Question 109 Question 1091 pts Which choice below does NOT show a statement that will cause an error?

int num = 4.5; String word = 45; double dub = 5; char let = "b"; More than one of these

question: Question 110 Question 1101 pts What type of error, if any, will be thrown by the code segment below? double dub = 4.5; int num = 4; num += dub;

loss of precision incompatible types No error

question: Question 111 Question 1111 pts What type of error, if any, will be thrown by the code segment below? String word = "5"; int num = word;

loss of precision incompatible types No error

question: Question 102 Question 1021 pts What type of error, if any, will be thrown by the code segments shown? String word = "5.7"; double dub = word;

loss of precision incompatible types no error

question: Question 34 Question 341 pts In the output statement System.out.println(___________), the item inside the parentheses is generally called a(an) _____________.

parameter method variable object parameter

question: Question 121 Question 1211 pts Which of the following is a legal variable name in Java?

teset.1 the answer boolean ans 3average

question: Question 97 Question 971 pts The term "binary" indicates that an operator that can perform more than one function.

True False False

question: Question 30 Question 301 pts In the output statement, System.out.println("\n \t \\ \""); the underlined portion will cause a:

" to appear in the output \ to appear in the output tab jump line feed line feed

question: Question 65 Question 651 pts Classify the following statement as a rule, "good idea", or convention. A Java constant is all capital letters.

"good idea" convention rule convention

question: Question 47 Question 471 pts Which choice best fills the blank below? System.out.printf("___","Joe");

%d $c %f %s %s

question: Question 41 Question 411 pts What symbol is used to indicate the start of a format specifier?

% # & $ %

question: Question 91 Question 911 pts The acronym ASCII stands for:

American System for Character Information Interchange American Standard Code for Information Interchange American Standard Characters for Information Interchange American Standard Code for Indicating Information This acronym does not mean anything

question: Question 5 Question 51 pts An error message gives four specific pieces of information for each error. Which choice listed below is NOT one of those four pieces?

File name Instructions on how to fix the error Line number Brief message Instructions on how to fix the error

question: Question 54 Question 541 pts Which of the format specifiers below do NOT require a matching argument in the parameter list? I. %s II. %d III. %f IV. %% V. %n

II only All of htem require matching arguments I only IV and V only II and III only IV and V only

question: Question 9 Question 91 pts In the program shown below, select the choice that best describes the error in this program, if any. 1. public class Hello { 2. public static void main (String [] args) { 3. System.out.println("Hello, World") 4. } 5. }

Line 1 - Syntax Line 1 - Lexical Line 2 - Lexical No error Line 3 - Syntax Line 3 - Syntax

question: Question 17 Question 171 pts In the program shown below, select the choice that best describes the error in this program, if any. 1. public class Hallo { 2. public static void main (String [] args) { 3. System.out.println("Hello, World"); 4. }}

Line 2 - Lexical Line 2 - Syntax Line 1 - Lexical No error Line 1 - Syntax Line 1 -Lexical

question: Question 13 Question 131 pts In the program shown below, select the choice that best describes the error in this program, if any. 1. public class Hello { 2. public static void main (String [] args) { 3. System.out.prinltn("Hello, World"); 4. }}

Line 4 - Syntax No error Line 3 - Syntax Line 4 - Lexical Line 3 - Lexical Line 3 - Lexical

question: Question 45 Question 451 pts If the current date and time is Monday, July 28, 2014 at exactly 9 o'clock in the morning, Central Daylight Time, what is the output of the statement shown below? import java.util.*; public class printf { public static void main(String[] args) { Calendar cal = Calendar.getInstance(); System.out.printf("%tc", cal); } }

Monday Jul 28 09:00:00 CDT 2014 Mon Jul 28 09:00:00 CDT 2014 Mon July 28 09:00:00 CDT 2014 Mon Jul 28 9:00 CDT 2014 Mon Jul 28 09:00:00 2014 Mon Jul 28 09:00:00 CDT 2014

question: Question 15 Question 151 pts In the program shown below, select the choice that best describes the error in this program, if any. 1. public class Hello { 2. public void static main (String [] args) { 3. System.out.println("Hello, World"); 4. }}

No error Line 1 - Syntax Line 2 - Syntax Line 1 - Lexical Line 2 - Lexical Line 2- Lexical

question: Question 82 Question 821 pts Which of the data types listed below is NOT a Java data type?

String boolean double integer byte integer

question: Question 12 Question 121 pts Select the choice that best fills <blank6> in the program listed below. <blank1> blank2> Hello { <blank3> <blank4> blank5> <blank6>(<blank7> [] args) { <blank8>.out.<blank9>("Hello, World!"); } }

String void static System main main

question: Question 27 Question 271 pts In the output statement System.out.println(12.56), the 12.56 portion is referred to as a(an) __________________.

String literal boolean literal decimal literal integer literal decimal literal

question: Question 71 Question 711 pts Which of the following is NOT a valid statement?

String n = "A" int x = 5; float f = 2; boolean b = false; double d = 4.2; String n = "A"

question: Question 7 Question 71 pts Select the choice that best fills <blank8> in the program listed below. <blank1> blank2> Hello { <blank3> <blank4> blank5> <blank6>(<blank7> [] args) { <blank8>.out.<blank9>("Hello, World!"); } }

System String static main println System

question: Question 18 Question 181 pts Select the choice that best fills <blank5> in the program listed below. <blank1> blank2> Hello { <blank3> <blank4> blank5> <blank6>(<blank7> [] args) { <blank8>.out.<blank9>("Hello, World!"); } }

System main void static String void

question: Question 99 Question 991 pts The term "overloaded" indicates that an operator is able to work multiple items (2 or more) at a time.

True False False

question: Question 100 Question 1001 pts The "=" operator is for assignment, and is NOT used to compare two values for equality.

True False True

question: Question 69 Question 691 pts Which of the data types listed below is NOT normally used in a program?

byte int String double

question: Question 74 Question 741 pts Which of the following represents a correct ascending order of memory size designations?

byte, bit, gigabyte, megabyte, terabyte bit, byte, megabyte, kilobyte kilobyte, terabyte, gigabyte, megabyte bit, megabyte, terabyte, petabyte bit, megabyte, terabyte, petabyte

question: Question 85 Question 851 pts Which of the choices listed is NOT a valid assignment statement?

char let = 65; int num = 'A'; double dub = 14; "Hello" = String word; None of these are valid

question: Question 68 Question 681 pts Which of the following is NOT a valid statement?

char n = "A" int x = 5; float f = 2.1f; byte b = 100; double d = 4.2;

question: Question 24 Question 241 pts In the output statement System.out.println("Hello, World!"), the word out is the name of a Java _________.

class method object variable object

question: Question 25 Question 251 pts The outermost "block" of any program is the ____________ block.

class output method main class

question: Question 2 Select the choice that best fills <blank2> in the program listed below. <blank1> <blank2> Hello { <blank3> <blank4> blank5> <blank6>(<blank7> [] args) { <blank8>.out.<blank9>("Hello, World!"); } }

main void static class public class

question: Question 35 Question 351 pts In the output statement System.out.println("Hello, World!"), the word println is the name of a Java ________.

method variable class object method

question: Question 10 Question 101 pts Which of the following is NOT an example of a syntax error?

missing bracket, { or } semi-colon missing missing parentheses, ( or ) missing quote at end of string a misspelled word a misspelled word

question: Question 40 Question 401 pts In the program segment below, what is the output of the bolded and underlined section of line 3? 1 public class Hello { 2 public static void main (String [] args) { 3 System.out.println("\"Hello, World\" is tra\tditionally"); 4 System.out.println(" the \\first/ program"); 5 System.out.println("taught in computer science."); 6 }}

tra ditionally traditionally tra\tditionally tra ditionally tra ditionally

question: Question 38 Question 381 pts In the output statement System.out.println("Hello, World!"), the word System is the name of a Java ______.

variable object class method class

question: Question 19 Question 191 pts Which of the following is NOT an example of a lexical error?

words inside quotes are misspelled misspelled word word supposed to be capitalized, but is not file and class names don't match Java reservered words out of order words inside quotes are misspelled

question: Question 50 Question 501 pts Which choice best fills the blank below? System.out.printf("%d", ___);

"cat" 1.2 More than one answer will work 14 'E' 14

question: Question 21 Question 211 pts In the program segment below, which line indicates the class header? 1 public class Hello { 2 public static void main (String [] args) { 3 System.out.println("\"Hello, World\" is tra\tditionally"); 4 System.out.println(" the \\first/ program"); 5 System.out.println("taught in computer science."); 6 }}

2 6 1 3 1

question: Question 92 Question 921 pts Write the ASCII value for that character in the blank. "7" = [___]

55

question: Question 4 Question 41 pts In the program shown below, select the choice that best describes the error in this program, if any. 1. public class Hello { 2. public static void main (String [] args) { 3. system.out.println("Hello, World"); 4. } 5. }

Line 2 - Lexical Line 3 - Lexical Line 3 - Syntax Line 2 - Syntax No error Line 3 - Lexical

question: Question 98 Question 981 pts The term "unary" indicates that an operator only works on one item or object.

True False True

question: Question 22 Question 221 pts In the output statement System.out.println(999), the 999 portion is referred to as a(an) __________________.

boolean literal decimal literal String literal integer literal integer literal

question: Question 33 Question 331 pts In the output statement System.out.println("Hello, World!"), the "Hello, World!" portion is referred to as a(an) __________________.

boolean literal decimal literal integer literal String literal String literal

question: Question 32 Question 321 pts Which choice below is the proper class heading for a Java program contained in a file named myProgram.java?

class myProgram.java public class myProgram.java class myProgram public class myProgram public class myProgram

question: Question 73 Question 731 pts Classify the following statement as a rule, "good idea", or convention. A Java identifier is descriptive and meaningful.

con "good idea" rule "good idea"

question: Question 83 Question 831 pts Classify the following statement as a rule, "good idea", or convention. A Java identifier contains only letters, digits, and the underscore symbol.

convention "good idea" rule

question: Question 66 Question 661 pts Which of the data types listed below is an object Java data type?

short String double boolean byte String

select the choice that best fills <blank7> in the program listed below. <blank1> <blank2> Hello { <blank3> <blank4> <blank5> <blank6>(<blank7> [] args) { <blank8>.out.<blank9>("Hello, World!"); } }

static String println main System String

question: Question 28 Question 281 pts p______ s________ v_____ m_____(S_____ [] a___) is the structure for the main method header of any Java program. What word goes in the S_________ blank?

static System String string String

question: Question 56 Question 561 pts Which choice below best fills the blank below? System.out.printf("___", 52);

%f %c %d %s

question: Question 130 Question 1301 pts What is output by the following code? int val = -2; val++; val--; val++; val++; val++; val--; val++; System.out.println(val);

0 1 2 3 5

question: Question 122 Question 1221 pts What is (6 % 2) * 7?

0 1 7 14 21

question: Question 131 Question 1311 pts What is the value of w after executing this segment of code? int w = 18; w += 18;

0 18 36 324 Nothing, there is an error

question: Question 88 Question 881 pts What is output by the code segment shown below? int num = 3; double dub = 2.1; System.out.printf("%3.1f",num - dub);

1.0 5.1 1.1 0.9 No output due to error

question: Question 87 Question 871 pts What is output by the code segment shown below? int num = 3; char let = 'D'; System.out.println(num + let);

103 71 119 3D No output due to error

question: Question 53 Question 531 pts Which choice best fills the blank below? System.out.printf("%s", ___);

14 "cat" 'E' 1.2 More than one answer will work More than one answer will work

question: Question 59 Question 591 pts Which choice best fills the blank below? System.out.printf("%c",____);

More than one answer will work 1.2 "cat" 14 'E'

question: Question 112 Question 1121 pts Which choice will correctly output the value 5? int num = 4567;

System.out.println(num/100); System.out.println(num%100/10); System.out.println(num%1000/100); System.out.println(num[2]); System.out.println(num[3]);

question: Question 101 Question 1011 pts The "!=" operator is used to check for equality, whereas the "==" is used to check for inequality.

True False

question: Question 52 Question 521 pts Which is the output of this statement? System.out.printf("%s%n%s%%%s", "a", "b", "c");

a%nb%c There is no output due to an error a%nb%%c a b%c abc a b%c

question: Question 134 Question 1341 pts Correct the following code so that q stores the nearest integer below 82.3847. int q = 82.3847;

int q = (double) 82.3849; int q = int (82.3847); int q = (int) 82.3847; int q = double (82.3847); No changes, the code is fine.

question: Question 115 Question 1151 pts In the code segment shown below, which of the following choices will NOT correctly fill <statement1> in order to output the value 10? (Choose two answers) int num = 20; <statement1 > System.out.println(num);

num %= 10; num += -10.0; num /= 2; num -= 15;

question: Question 116 Question 1161 pts In the code segment shown below, which of the following choices will correctly fill <statement1> in order to output the value 11? int num = 10; <statement1> System.out.println(num);

num++; ++num; num--; num = num + 1; More than one of these

question: Question 128 Question 1281 pts For which of the following would modular division be LEAST likely to be useful?

time calculations using days and weeks testing whether numbers are even or odd converting decimals to whole numbers money calculations using dollars and cents identifying the digits of an integer

question: Question 44 Question 441 pts The first parameter of the printf method is called the _________ ______________.

class header parameter argument format specifier format string format string

question: Question 77 Question 771 pts Classify the following statement as a rule, "good idea", or convention. A Java identifier starts with a letter or the underscore symbol

convention "good idea" rule rule

question: Question 62 Question 621 pts Classify the following statement as a rule, "good idea", or convention. A Java identifier does not contain symbols or spaces

convention rule "good idea" rule

question: Question 78 Question 781 pts Which of the following is NOT a valid statement?

double d = 4.2; float f = 2.1f; boolean b = false; String n = 'A'; char x = 55;

question: Question 76 Question 761 pts Which of the following is NOT a valid statement?

double d = 4.2; int x = 5; float f = 2.1f; String n = "A"; boolean b = "true";

question: Question 16 Question 161 pts Which of the following represents the computer process that checks the program for any lexical or syntax errors?

execute run debug compile proofread compile

question: Question 79 Question 791 pts Which of the following is NOT a valid statement or set of statements?

final double d; d = 4.2; final boolean b; b = true; final short f = 2.1; final String n = "A"; final int x = 5; x = 6; final int x = 5; x = 6;

question: Question 49 Question 491 pts Inside the quotes of the format string are things like %s, %f, and %d, which are called _____________ __________________.

format strings arguments format specifiers headers format specifiers

question: Question 123 Question 1231 pts Which of the following would properly create A and B as integer variables?

A int; B int; int A B; int A; int B; int A; B; int A int B;

question: Question 113 Question 1131 pts Which choice contains the correct fix for the error in the bolded statement? int num = 45; String word = num;

String word = ""+num; String word = String(num); There is no error to fix String word = (String)num; String word = (int)num;

question: Question 132 Question 1321 pts When might you encounter a problem with integer overflow?

When trying to store a decimal number in an int variable When trying to store an integer which is too big to be stored in an int variable When trying to print an int in the middle of a String When trying to divide one integer by another using ints when the answer should be a decimal value When trying to store an integer value as a double

question: Question 103 Question 1031 pts What type of error, if any, will be thrown by the code segments shown? int num = 100; char let = num;

loss of precision incompatible types no error

question: Question 104 Question 1041 pts What type of error, if any, will be thrown by the code segments shown? String s = "a"; char let = s;

loss of precision incompatible types no error

question: Question 105 Question 1051 pts What type of error, if any, will be thrown by the code segments shown? double val = 3.5; int num = val;

loss of precision incompatible types no error

question: Question 106 Question 1061 pts What type of error, if any, will be thrown by the code segments shown? int num = 5; char let = 's'; let -= num;

loss of precision incompatible types no error

question: Question 107 Question 1071 pts What type of error, if any, will be thrown by the code segments shown? int num = 34; double dub = num;

loss of precision incompatible types no error

question: Question 108 Question 1081 pts What type of error, if any, will be thrown by the code segments shown? int num = 100; String word = num;

loss of precision incompatible types no error

question: Question 133 Question 1331 pts There are two integer variables in our program, minutes and hours, which represents time. If in the program, we increase the number of minutes by one, which of the following lines of code will correctly update hour and minutes?

minutes = minutes % 60; minutes = minutes + hours % 60; hours = hours + minutes / 60; minutes = minutes % 60; hours = hours + minutes % 60; minutes = minutes / 60; hours = hours + minutes / 60;

question: Question 127 Question 1271 pts Consider the following variable declaration: double y = 52; Does a cast need to be added so this code will compile and run successfully? ______. If so, what should be typed for this cast? _______

no, nothing yes, (decimal) yes, (double) yes, (int) yes, (String)

question: Question 70 Question 701 pts Classify the following statement as a rule, "good idea", or convention. A Java identifier should not be a single letter, like x.

"good idea" rule convention good idea

question: Question 57 Question 571 pts Of the many format specifiers available with the printf method, only three will be used on a common and regular basis. Which of the following is NOT one of those three?

%c %f %d %s

question: Question 48 Question 481 pts Since all Java data types (numbers, strings, etc) can be represented as strings, the _______ format specifier can receive any type of Java data.

%f %c %s %d %s

question: Question 58 Question 581 pts Which choice best fills the blank below? System.out.printf("___", 5.2);

%f %s %c %d

question: Question 55 Question 551 pts Which choice below represents the best format string for the output statement shown? String a = "cow"; int b = 57; double c = 9.5; System.out.printf("____________",a,b,c);

%s %f %d %s %d %f %f %d %s %f %d %s %d %s %f

question: Question 64 Question 641 pts Which of the following values is represented by Byte.MAX_VALUE?

-127 127 -128 128

question: Question 81 Question 811 pts Which of the following values is represented by Byte.MIN_VALUE?

-127 127 128 -128

question: Question 75 Question 751 pts Which of the following values is represented by Integer.MIN_VALUE?

-32767 -128 -9223372036854775808 -2147483648 -2147483648

question: Question 86 Question 861 pts What is output by the code segment shown below? char let = 48; String str = "Zero"; System.out.println(let * str);

0 Zero 48Zero 0Zero No output due to error

question: Question 43 Question 431 pts Which number below does NOT represent the normal number of parameters in a typical printf output statement?

1 2 3 4 or more 1

question: Question 23 Question 231 pts In the program segment below, which line indicates the main header? 1 public class Hello { 2 public static void main (String [] args) { 3 System.out.println("\"Hello, World\" is tra\tditionally"); 4 System.out.println(" the \\first/ program"); 5 System.out.println("taught in computer science."); 6 }}

6 3 1 2 2

question: Question 51 Question 511 pts Which choice best fills the blank below? System.out.printf("%f", ___);

1.2 'E' "cat" More than one answer will work 14 1.2

question: Question 84 Question 841 pts Which of the following values is represented by Math.PI?

1.41 3.14 2.72 9.99 1.5

question: Question 63 Question 631 pts Which of the following values is represented by Math.E?

2.72 9.99 3.14 1.5 1.41

question: Question 90 Question 901 pts What is output by the code segment shown below? char let1 = 'J'; char let2 = 'j'; System.out.println(let1 - let2);

32 -32 26 -26 No output due to error

question: Question 60 Question 601 pts Which of the following values is represented by Integer.MAX_VALUE?

32767 9223372036854775807 2147483647 127 2147483647

question: Question 3 Question 31 pts In the program shown below, select the choice that best describes the error in this program, if any. public class Hello { public static void main (String [] args) { System.out.println("Hello, World"); } }

Line 3 - Lexical Line 2 - Lexical Line 2 - Syntax No error No error

question: Question 46 Question 461 pts Which choice below represents the correct output for this statement? System.out.printf("%s,World!", "Hello");

Hello,World! Hello, World! HelloWorld Hello World Hello,World!

question: Question 67 Question 671 pts Which of the following is a valid Java identifier?

hash#Tag 4u age my name static

question: Question 14 Question 141 pts Select the choice that best fills <blank1> in the program listed below. <blank1> blank2> Hello { <blank3> <blank4> blank5> <blank6>(<blank7> [] args) { <blank8>.out.<blank9>("Hello, World!"); } }

static public void class main public

question: Question 31 Question 311 pts p______ s________ v_____ m_____(S_____ [] a___) is the structure for the main method header of any Java program. What word goes in the s_________ blank?

string String static System static

question: Question 26 Question 261 pts In the output statement, System.out.println("\n \t \\ \""); the underlined portion will cause a:

tab jump " to appear in the output \ to appear in the output line feed " to appear in the output

question: Question 39 Question 391 pts In the program shown below, what is the output of the bolded and underlined section of line 4? 1 public class Hello { 2 public static void main (String [] args) { 3 System.out.println("\"Hello, World\" is tra\tditionally"); 4 System.out.println(" the \\first/ program"); 5 System.out.println("taught in computer science."); 6 }}

the \first/ program the \\first/ program error the first program the \first/ program


Conjuntos de estudio relacionados

different types of vegetarian diets

View Set

Ch. 13 Marketing: Helping Buyers Buy

View Set

Chapter 39: Assessment of Musculoskeletal Function PrepU

View Set

Principles of Embalming III - PHT 414 Spring 2021 Midterm Test Questions

View Set

PNU 120 Taylor PrepU Chapter 17: Implementing

View Set

Chapter 14 Lab Textbook Reading and Review Questions

View Set