Java - Memory Management Basics
Which of the following is the correct way to create a new object in Java?
new keyword followed by the constructor call with parentheses.new MyClass();. Options A, C, and D are incorrect due to missing new, wrong keywords, or missing parentheses.new ClassName() to create objects [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions