Test
Java - Programming Concepts Final Review
Este test tiene tipos de pregunta que se abren en el reproductor de siempre.
Preguntas del test (21)
1The symbol to generate a comment that runs to the end of a line is [blank_start]//[blank_end]
- A//
2The symbol that generates a comment that can span over multiple lines is [blank_start]/*[blank_end]
- A/*
3Which of the following are symbols used for comments in java?
- A/
- B//
- C/*
- D--
- E*/
- F/**
4Which of the following are true about identifiers?
- AIdentifies can include uppercase and lower case letters
- BIdentifiers cannot include numbers
- COnly two non-alphabet and non-digit symbols can be used for identifiers
- DIdentifiers can start with a number
- EIdentifiers can include numbers
- FIdentifiers must start with a letter
- GThe underscore can be used in identifiers
- HThe dollar sign can be used in identifiers
- IThe exclamation point can be used in identifiers
5How many variables have been initialized in the following code?
final int TOTAL = 50;
int total = x;
String Total = "Your total is: ";- A1
- B2
- C3
6Which of the following are valid identifiers?
- A$maxHeight
- B0maxHeight_
- Cmax_height
- D$max_Height
- E!Maxheight
7What is the naming convention typically used for class names?
- Auppercase
- Btitle case
- Ccamel case
- Dthere is no convention
8What naming convention is typically used for constants?
- Atitle case
- Blowercase
- Cuppercase
- Dcamel case
- EThere is no naming convention for constants.
9How many lines of output is generated by the following code?
System.out.print("Lorem ipsum dolor sit amet, consectetur adipiscing elit");
System.out.print("sed do eiusmod tempor incididunt ut");
System.out.println("labore et dolore magna aliqua. Ut enim ad");
System.out.println("minim veniam, quis nostrud exercitation ");
System.out.print("ullamco laboris nisi ut aliquip ex ea commodo consequat");
System.out.println("Duis aute irure dolor in reprehenderit.");- A1
- B2
- C3
- D4
- E5
10The println method advances output to the next line
- AVerdadero
- BFalso
11Which is of the following is true about output statements?
- AThe printlin and print methods have no differences between them
- BThe println methods forces succeeding output to the next line
- CThe print method displays output on the current line
- Dthe print method moves the cursor to the next line
12A string literal is denoted by the symbol [blank_start]" "[blank_end]
- A" "
13Strings can be broken up across several lines.
- AVerdadero
- BFalso
14The string concatenation operator is the [blank_start]+[blank_end] symbol.
- A+
15The string concatenation operator is the same as the addition operator.
- AVerdadero
- BFalso
16Which of the following operations if any are being performed in the following code?
System.out.print("The distributor can supply " + 50 + " scales."
+ "Each scale has a limit of " + 40 + 60 + " lbs");- Aaddition
- Bconcatenation
17The data types for integers include [blank_start]byte[blank_end], [blank_start]short[blank_end], [blank_start]int[blank_end], and [blank_start]long[blank_end].
- Abyte
- Bshort
- Cint
- Dlong
18The data type used for decimal numbers are [blank_start]float[blank_end] and [blank_start]double[blank_end].
- Afloat
- Bdouble
19The primitive data types arranged from smallest to largest size is [blank_start]byte[blank_end], [blank_start]short[blank_end], [blank_start]int[blank_end], [blank_start]long[blank_end], [blank_start]float[blank_end] and [blank_start]double[blank_end].
- Abyte
- Bshort
- Cint
- Dlong
- Efloat
- Fdouble
20The data type that can be used to store numbers, letters and symbols is [blank_start]char[blank_end].
- Achar
21What is the purpose of the final modifier
- Ato define an entity that can only be assigned once
- Bto make sure a constant's value cannot be changed
- Cto prevent overriding
- Dto designate when the program is at its end
Información
- Descripción
- Study quiz for java based programming concepts
- Autor
- Ashley Maximilien
- Idioma
- English
- Visitas
- 2
- Etiquetas
- Valoración
- Aún sin valoraciones Valora este test