Practice mode / Java Which of these operators is used to allocate memory to array variable in Java? A Option A: alloc B Option B: malloc C Option C: new malloc D Option D: new Correct answer D. new Show answer Report a problem How we write and check questions
Question 01 / Java Which one is true about a constructor? A Option A: A constructor must have the same name as the class it is declared within. B Option B: A constructor is used to create objects. C Option C: A constructor may be declared private D Option D: All of the above Correct answer D. All of the above Show answer Open question
Question 02 / Java Which symbol is used to contain the values of automatically initialized arrays? A Option A: Brackets B Option B: Braces C Option C: Parentheses D Option D: Comma Correct answer B. Braces Show answer Open question
Question 03 / Java Which one is a template for creating different objects? A Option A: An Array B Option B: A class C Option C: Interface D Option D: Method Correct answer B. A class Show answer Open question
Question 04 / Java What is garbage collection in the context of Java? A Option A: Java deletes all unused java files on the system. B Option B: Memory used by the object with no reference is automatically reclaimeD. C Option C: The JVM cleans output of Java program with error. D Option D: Any unused package in a program automatically gets deleteD. Correct answer B. Memory used by the object with no reference is automatically reclaimeD. Show answer Open question
Discussion