GMU CS 211 Questions And Answers With Verified Study Solutions
Which of the following is not a primitive data type in Java? A. int B. double D. Character C. String E. C and D - Answer-E. C and D Which of the following type casting is done implicitly in Java? A. int to float B. double to float C. byte to short D. A and B E. A and C - Answer-E. A and C Which of the following is false about constructors in java? A. All classes in java have at least one constructor B. Constructors cannot be private C. Constructors' tasks include initialization of instance variables D. Constructors cannot be inherited E. All of the above - Answer-B. Constructors cannot be private Which of the following annotation is used in JUnit framework if we want a block of code to be executed only once at the beginning of the entire test?A. @Test B. @Before C. @After D. @BeforeClass E. @AfterClass - Answer-D. @BeforeClass Which of the following assignment statement is an error(syntax) without explicit type casting? A. Super class reference = sub class object B. Sub class reference = sub class object C. Super class reference = super class object D. Sub class reference = super class object E. None of the above - Answer-D. Sub class reference = super class object
Escuela, estudio y materia
- Institución
- GMU CS 211
- Grado
- GMU CS 211
Información del documento
- Subido en
- 29 de mayo de 2024
- Número de páginas
- 5
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Temas
-
gmu cs 211
Documento también disponible en un lote