click below
click below
Normal Size Small Size show me how
LHS_COMPSCI
Question | Answer |
---|---|
Which of the following lines correctly defines an integer variable? | int i = 234; |
Which of the following lines correctly defines a String variable? | string s = "cdef"; |
Which of the following methods would move the cursor down to the next line? | println() |
Which of the following types uses the least memory? | char |
Which of the following types uses the most memory? | float |
Which of the following would print one backslash on the screen if used in a print() or println()? | \\ |
What is output by the code below? char x ='A'; System.out.print(x+3); | 68 |
What is output by the code below? int x= 12; x=x-1; System.out.print(x); | 11 |
What is output by the code below? int x = 15; x = x%5; System.out.print(x); | 0 |
What is output by the code below? int x = 7; x++; System.out.print(x); | 8 |