Original Post
feel stupid for asking this but in java, to create an object of a class i thought you needed the class name then the name of the object you wanted to create.. like this
Student student1 = new Student();
but in this tutorial i am following the author created 2 Image objects in a different way:
plane = new Image("data/plane.png");
land = new Image("data/land.jpg");
what is he doing above? is he creating 2 Image objects or is he doing something else? is this not the correct way to create an object below?:
Image plane = new Image("data/plane.png");
Image land = new Image("data/land.jpg");
Student student1 = new Student();
but in this tutorial i am following the author created 2 Image objects in a different way:
plane = new Image("data/plane.png");
land = new Image("data/land.jpg");
what is he doing above? is he creating 2 Image objects or is he doing something else? is this not the correct way to create an object below?:
Image plane = new Image("data/plane.png");
Image land = new Image("data/land.jpg");