New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
let us know your question? ;-) here mayb?
Could you explain classes, objects, and constructors to me?
Ask @jcaleb
class - a construct that is used as a blueprint to create instances of itself
object - instance of class, has lifespan - created and eventually destroyed
In short, class is waffle maker and object is waffle
You need to make waffle maker first and then make as many waffles as you want
Sure, message me on Skype or just post here.
A class is like a model. It's a definition of something.
An object is an instance of a class.
Constructor is a method used to create a new object. You can give it inputs/things that need to be done.
You can imagine a class is a recipe. An object would then be a dish made from the recipe. A constructor would be what you did to create this recipe. The arguments to the constructor would be ingredients.
Constructor is a special subroutine called to initialize object
PM sent
Classes is like blueprint. A specification of what something have and how they will behave. E.g. Person, Car.
Classes have 2 main components. data and methods. Data (variables) holds the state of the object. While method defines the behavior.
Objects are specific instances of Classes. E.g. Jon is an object of type person. My Toyota Innova with plate number XYZ-123 is an object of type Car.
Objects are created at some particular point in time. A constructor is a special method of what are the things that should be done when creating a particular object.
Thanks guys
are you okay already? if you have more questions, just ask bro
I've looking at it, but I'll pm me if I need anything else.
LET is awesome
*you
PS: I don't know any java
its a family!
@lele0108 What kind of exam is it? Java's great!
sorry but this is spoon feeding. his questions are probably chapter 1 of their reference book.
Actually we're like a month into our java course
a month into your course and still do not know about these basic stuffs?
we where probably already coding some stuffs a month into our java course during our time.
If you have an exam tomorrow on Java and you don't know what objects are, you're beyond help.
Sorry to say it @lele0108 but if you're being taught properly, or atleast studying the right material, this far in, you should understand what the fundamentals are.
In any case; there's plenty of resources online .
classes are what you go to to learn Java
@raindog308 @eastonch
Our teacher sucks, he assumes you know a lot of the things, and just speeds along. I spent around 3 hours reading through java online yesterday, so I figured out most of it.
This book is good and free:
http://mindview.net/Books/TIJ/
My only complaint with it is that it's entirely language-oriented. In these major languages (Java, C#, etc.), in reality you spend more time learning how the big libraries work than the language, but if you're starting from scratch, TIJ is good.
Day before java exam, good luck :=
If you understand Finnish, you can look this site.