click below
click below
Normal Size Small Size show me how
LHS_COMPSCI
| Which of the following correct | Answer |
|---|---|
| Which of the following correctly defines an integer variable? | int num1 = 2; |
| Which of the following lines correctly defines a string variable? | string x = "hello"; |
| 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? | double |
| Which of the following would print one backslash on the screen if used in a print() or println() | "\\" |
| What is the output by the code below? char x = 'A'; System.out.print (x + 3); | 68 |
| What is the output by the code below? int x = 12; x = x -1; System.out.print (x); | 11 |
| What is the output by the code below? int x = 15; x = x % 15; System.out.print (x) | 0 |
| What is the output by the code below? int x = 20; x = x * 2; System.out.print (x) | 40 |