+ 2

What is classes in java

can anybody give detailed explanation of classes in java

23rd Aug 2018, 5:48 PM
Vamsikrishna Mummeneni
Vamsikrishna Mummeneni - avatar
3 Respostas
+ 2
Simply a class is a collection of related data. It was invented as a way to abstract information which is relivent to eachother so it's easier to work with. Imagine an object (as Java is an object Oriented Language), and that object has qualities and information associated with it. Example: A ball has a diameter, a radius and a weight. A class can have other classes, or inherit from classes. Example: A car has a Wheel. You can also have abstract classes which you cannot instantiate, static classes which cannot be inherited. There are strategies for relationships between classes, and Design Patterns you can study. SO. There's a lot to understand about classes, and they change per object oriented language.
23rd Aug 2018, 6:47 PM
Justin Petluk
Justin Petluk - avatar
24th Aug 2018, 3:49 AM
Maninder $ingh
Maninder $ingh - avatar