+ 1
what is the main use of classes i cant seem to understand why classes is difficult for me
java classes
2 Réponses
+ 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.
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.