explain the purpose of using a new keyword in a Java programming
Answers
Answered by
68
Answer:
The Java new keyword is used to create an instance of the class. In other words, it instantiates a class by allocating memory for a new object and returning a reference to that memory. We can also use the new keyword to create the array object.
plz make me brainlist
Answered by
27
Java Programming/Keywords/new. new is a Java keyword. It creates a Java object and allocates memory for it on the heap. new is also used for array creation, as arrays are also objects.
Similar questions