FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Constructors in Java, help





pollux1er
Hi to everybody. I am a java beginner and i worried about constructors. What is the main role of constructors in Java Language? Wink
snowboardalliance
pollux1er wrote:
Hi to everybody. I am a java beginner and i worried about constructors. What is the main role of constructors in Java Language? Wink


Constructors handle initialization. They set initial variables and you need to call one before using an object (or it will throw null pointer exceptions.)

Constructors are a pretty basic part of OOP and I recommend you read some java tutorials on this because it is something you should know. Maybe someone here can offer a more detailed explanation though.
pollux1er
snowboardalliance wrote:
pollux1er wrote:
Hi to everybody. I am a java beginner and i worried about constructors. What is the main role of constructors in Java Language? Wink


Constructors handle initialization. They set initial variables and you need to call one before using an object (or it will throw null pointer exceptions.)

Constructors are a pretty basic part of OOP and I recommend you read some java tutorials on this because it is something you should know. Maybe someone here can offer a more detailed explanation though.


Thanks first for the explanation you gave. It is helpful. Wink
jabapyth
Are you worried specifically about constructors because you know another language that doesn't have them? Are you familiar w/ OOP?
ThePolemistis
jabapyth wrote:
Are you worried specifically about constructors because you know another language that doesn't have them? Are you familiar w/ OOP?


Don't confuse the kid. Smile
Related topics
JAva HELP
Does anypne help me about JAVA on UNIX?
Java Help
java help:how does dynamic instantiation of classess happen?
java help:
I need a javascript!!! Help!
Help with php and java script
JAVA hElp
java help
Java Help
java help
[Java] Wanna help me figure out this error?
Help needed for making a server in java....
java help pls!
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.