I am a beginner in Java, so I don't know about the heap concept when I googled. In an OOP tutorial, I learnt that when we create an object using 'new' keyword, memory is allocated to the object. What if I don't provide values to the attributes of the instance of the class, so will that instance variables also take up memory but they are without any values.
class Employee{
int age;
String name;
}
public class Main {
public static void main(String[] args) {
Employee emp = new Employee();
// I didn't provide any values to age and name
}
}