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 trialFEI LI
828 Pointswhy the "Point ,point" parameter wasn't assigned a type?
as it shows in the video
public bool OnMap( Point, point) { }
2 Answers
andren
28,558 PointsThat's not actually what is shown in the video. This is what is shown in the video:
public bool OnMap(Point point) { }
There is no comma between Point
and point
.
Point
is the type of the parameter and point
is the name.
FEI LI
828 PointsI kind get it but I am still confused... How do you get a screen shot uRL? what if I want to upload a picture from my laptop, how should I do it?
FEI LI
828 PointsFEI LI
828 PointsOMG, you are absolutely right.... , I didn't realize that Point is actually one of the types..
also, can you tell me how to attach a photo to the comment?
Thank you very much
andren
28,558 Pointsandren
28,558 PointsIn Java all classes are considered as a type of value. So whenever you create a class you are also creating a type in effect.
To attach an image you just need to type this:
Where
alt text
is the alt-text of the image/path/to/img.jpg
is the direct URL for the image andTitle
is the title you want the image to have.Here for example:
Is an image of the Treehouse logo with "Example" as the title and "This is an example" as the alt text.