What is a class?


show more Classes are blueprints describing attributes and behavior that you use to create objects while programming. In Object-Oriented languages, you'll work with a lot of classes already written, such as the Java Class Library. This availability enables you to create objects without also having to create the same classes repeatedly for each program. However, you still need to be able to write your own classes, and this video tutorial helps you learn, "What is a class?" show less
please wait ...

What is a class?

Objects and classes go hand in hand. We can't talk about one without talking about the other. And the entire point of Object-Oriented Design is not about objects, it's about classes, because we use classes to create objects. So a class describes what an object will be, but it isn't the object itself. A class is a blueprint, a detailed description, a definition. The blueprint example is a good one. If you want to build a house, you make a blueprint first.

It describes everything about how that house will be built, but it isn't the house. You then use that blueprint to build the house. For us, we write the class then use the class to create the object. And just as we could use the same blueprint to build one, two, or a hundred houses, we can define the class once and then create a thousand objects based on that one class, but the class comes first. The class comes first, that's what we write.

So a class has a name. Literally, what is it? And it describes two things: attributes and b...

What is a class?
Video duration: 4m 43s 3h 1m Intermediate

Viewers:

Classes are blueprints describing attributes and behavior that you use to create objects while programming. In Object-Oriented languages, you'll work with a lot of classes already written, such as the Java Class Library. This availability enables you to create objects without also having to create the same classes repeatedly for each program. However, you still need to be able to write your own classes, and this video tutorial helps you learn, "What is a class?"

Subject:
Developer
Software:
Java
Author:
please wait ...