i dont know exactly why constructors are being used, it is used in what purpose?
psylocke 0 Newbie Poster
Recommended Answers
Jump to Postsounds like he hasn't covered objects yet in class. Here's an example where a constructor takes in 1 string.
MyClass person = new MyClass("name");
The object "person" now has an attribute already set to that string. Without a constructor, you would have to do this:
MyClass person …
Jump to Postoops:cheesy:
when i learned about objects, i was told what they were but never understood it until i saw code, but thats just how i learn. seeing code and figuring it out rather than listening to what it is. I wrote a document awhile ago about what objects are …
All 5 Replies
Narue 5,707 Bad Cop Team Colleague
Phaelax 52 Practically a Posting Shark
Narue 5,707 Bad Cop Team Colleague
Phaelax 52 Practically a Posting Shark
nanosani 20 Technize.net addict Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.