0
How can i understand classes better?
8 odpowiedzi
+ 3
youtube
+ 2
Class is the core of Java programming. Why? Because Java is a programming language that support and implement full object-oriented concept. Each Java program is a class. This means, every concept or case of programming that you want to be implemented in Java, it should be wrapped into a class.
Classes can be defined as a blueprint that defines variables (data) and methods (behavior) of an object. Take a look of example object: car. Car has data such as brand, type, color, and so on. Car also has a specific behaviors that can differentiate between one and the other cars, such as the braking system, gear, and so forth. Now let us take the example of other object: human. Human has data or physical characteristics, such as: name, height, weight, fingerprint, hair color, and so on. In addition, human also has behaviors such as: how to walk, how to speak, and so forth. In the program, such objects can be defined as a class.
In programming, class actually not much different from the simple data type explained in previous post. The difference, simple data type used to declare normal variable, while the class is used to declare a variable to be an object.
More detail about class in http://javabasictoadvanced.blogspot.co.id/2016/06/class.html
+ 1
classes are blueprints for an object, you can use one blueprint to make many objects. All objects created from a blueprint are the same design, have the same attributes etc. the only difference between objects is the values of these attributes. (and of course the identity of the object)
+ 1
Class: Human being
Object : Man, Woman
Class : Fruit
Object : Apple, Banana, Mango ...
Class : Mobile Phone
Object : Apple , Samsung , LG ...
Class : Food
Object : Pizza, Rice ....
this might help!!
found it on stack overflow.
0
oracle website.
0
by learning :)
0
reading and understanding
0
Classes are blueprints for creating Objects in Java. Everything in Java is wrapped in Classes, and from there, Objects (or instances of a class) are created from the classes (which hold the data, or "blueprints") which will give the Objects (class instance) their attributes and their values for their specific identity to define them. Basically, Classes are the inner workings of any application or program that hold all of the information that any application needs to run.