In Java, objects are created with "new" keyword. " Java new" allocates memory to the newly created object at runtime. Observe the following on Java new Keyword, then we will go into details.
public class Employee
int salary = 5000;
public static void main(String args)
Employee emp1 = new Employee();
System.out.println("Employee Salary Rs."+emp1.salary);
Output Screenshot on Java new Keyword Employee emp1 = new Employee(); By program wise it it simple…