Learn Java Coding

Everything You Have To Know About Java

Objects

are a virtual thing, which get characteristics in a program.

objects java

Example

When you make an inventory program for someone who sells tables and chairs, the simplest way is to bring everything under in a category, like furniture.

package InventorySystem;

public class Furniture {

}
tables and chairs object

picture

To get an overview of my collection, I order my objects in categories. Every category will also be a new object.

package InventorySystem;

public class MyCollection {
		
}

You see 5 objects in the picture, however, in Java we will have 7 objects. Because the categories (tableCollection and chairCollection) are also objects.

We will work out this example in the next lesson when we order everything.

WHY USE OBJECTS?

 

GO TO NEXT

Next Post

Previous Post

© 2019 Learn Java Coding