New course! Every coder should learn Generative AI!
Try a free lesson+ 1
You're actually doing 2 things:
1- You're creating a new object in memory based on the student type.
2- you're creating an object reference named obj1 that refers to the new student object.