Docsity

Java Programming Fundamentals: Test Questions and Answers, Exams of Advanced Education

Toggle sidebar
bg1
Fundamentals of Programming and Software Engineering - Java
Test
What would be the Java code line to produce "Hello my name is Sue"? -
info += "Hello my name is Sue"
Select the terms relating to comparisons for equality. - !=
<=
>=
==
Select the words that involve the order of operations. - exponentiation,
modulus, parentheses, addition (remember PEMDMAS)
Select the terms relating to Java data types. - byte, long, double
User-defined methods that are __________ are available only within the
program in which they are created. - private
Which term is a Java keyword indicating that a method will not return a
value? - void
What is an escape sequence, and how is it used? - An escape sequence is
simple codes used in conjunction with a backslash to format program
output.
What is string literal in Java? - group of printable characters enclosed
within double quotation marks
Describe the Order of Operations in Java programming. - The Order of
Operations in programming are known under the acronym PEMDMAS,
which stands for parentheses, exponentiation, multiplication, division,
pf3

Partial preview of the text

Download Java Programming Fundamentals: Test Questions and Answers and more Exams Advanced Education in PDF only on Docsity!

Fundamentals of Programming and Software Engineering - Java Test What would be the Java code line to produce "Hello my name is Sue"? - info += "Hello my name is Sue" Select the terms relating to comparisons for equality. - != <=

= == Select the words that involve the order of operations. - exponentiation, modulus, parentheses, addition (remember PEMDMAS) Select the terms relating to Java data types. - byte, long, double User-defined methods that are __________ are available only within the program in which they are created. - private Which term is a Java keyword indicating that a method will not return a value? - void What is an escape sequence, and how is it used? - An escape sequence is simple codes used in conjunction with a backslash to format program output. What is string literal in Java? - group of printable characters enclosed within double quotation marks Describe the Order of Operations in Java programming. - The Order of Operations in programming are known under the acronym PEMDMAS, which stands for parentheses, exponentiation, multiplication, division,

modulus, addition, and subtraction. This is the order that Java follows this specific order for processing math calculations correctly. To which statement is the case statement most similar? - if-else Demonstrate how to write each condition as an if-else in Java. If yes, then the computer should print "The answer is A," "The answer is B," or "The answer is C." Otherwise, the computer should print "The answer is not here." Condition: variable choice is A, B, or C. - if (10 <= 12)} System.out.printIn ("The answer is A"); } What is "public static grossPay()" an example of? - Private() In a Java conditional statement, on what does the value of the variable depend? - The boolean statement being true or false. Which statement correctly distinguishes between curly brackets ({ }) and parentheses ( )? - Curly brackets {} enclose statements, while parentheses () enclose arguments or parameters. What is the correct Java syntax to output the sentence: My dog's name is "dee-dee"? - System.out.printIn("My dog's name is "dee-dee""); Select the terms relating to numbers larger than 50,000. - double long Explain why each UDM should only perform one action. - UDM creates a single data narrative, in order to stay clear, it should perform only one action.