In a Java program, two slash marks ( // ) indicates which of the following? correct answers the
beginning of a comment.
Java is a case-sensitive language. correct answers True
Valid or Invalid?
1) black&white
2) 1Statement
3) String
4)CSE110.Quiz1
5) Amount$ correct answers 1) valid
2)invalid
3)invalid
4)invalid
5)valid
What output will be produced by the following code fragment?
System.out.println ("It is good to be " + 6 + 6 ); correct answers It is good to be 66
Which of the following code segments can be used to print the message Hello Goodbye on one
output line? correct answers System.out.print("Hello "); System.out.print("Goodbye");
Scanner myScanner = new Scanner(System.in); int age; correct answers age =
myScanner.nextInt();
temporary storage while a program is running? correct answers RAM
, public class Test
{
public static void main(String[ ] args)
{
System.out.println("27+3"); System.out.println(27+3);
}
} correct answers 27+3
30
How many lines will be printed out for the following statement?
System.out.println("1 big bad wolf\t 8 the 3 little pigs\n 4 dinner\n 2night"); correct answers 3
x=10 and y=5.
What is output with the following statement?
System.out.println(" " + x + y); correct answers 105
Which library package would you import to use DecimalFormat class? correct answers java.text
What is the value of the expression 4*3-(29+20)%5/2 ? correct answers 12
Given the following assignment statement, which of the following answers is true regarding the
order that the operators will be applied based on operator precedence?
a = (b + c) * d / e - f; correct answers +, *, /, -
String s1 = "CSE110 Java";