Java - Memory Management Basics
Which of the following Java statements correctly creates an object stored in heap memory?
new keyword, which allocates memory on the heap.new String("hello"), which creates a String object on the heap. Other options declare primitives stored on the stack.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions