Java New Keyword

Java New Keyword


New Keyword In Java
 
As we have used new keyword multiple times before 
A new keyword is used to create new objects, In other words, we use new keyword to provide new memory to the class by creating new objects.
Now we will see an Example of new Keyword - 
 
Example - 
 
 
Output -