Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMatthew Williams
3,103 PointsI need help.
I'm just lost on this lesson. It doesn't help that I have no idea what constructors are (I understand they have no return types) but Udacity and Treehouse don't put these things in layman terms.
Any help and a description of constructors in 20 words or less would be extremely helpful.
public class Spaceship {
public String shipType;
public ship
public String getShipType() {
return shipType;
}
public void setShipType(String shipType) {
this.shipType = shipType;
}
}
2 Answers
Tarek M.Tolba
Courses Plus Student 3,613 PointsCheck those out:
http://imgur.com/a/1ivZG > Copied from SoloLearn.
https://docs.oracle.com/javase/tutorial/java/javaOO/constructors.html
Tarek M.Tolba
Courses Plus Student 3,613 PointsAlso I encourage you to take any of java basic courses beside the android track that would help you alot.