what is the main use of classes i cant seem to understand why classes is difficult for me | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what is the main use of classes i cant seem to understand why classes is difficult for me

java classes

20th Jul 2016, 4:09 PM
Mubarak O. Aderogba
Mubarak O. Aderogba - avatar
2 Answers
+ 1
Classes encapsulate data and methods, they provide a way to modularize you programs in a structural way that allows you to do things like set access controls, reuse methods, which are all very helpful when you are designing rather large applications. The reason you might find them difficult is because they require you to actually implement them and use them in a practical setting to realize their potential. Just having an abstract understanding of what they do is not enough, play around with them and as suggested read up on object oriented programming.
21st Jul 2016, 4:25 AM
Eric Gitangu
Eric Gitangu - avatar
0
think of a class as the blue print to building an object. a class is the structural design of an object. learn what an object and what object oriented programming is, then you'll understand what a class is.
21st Jul 2016, 12:15 AM
Dwayne Barsotta
Dwayne Barsotta - avatar