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 trialJunaid Shaikh
Courses Plus Student 1,533 Pointsgetting error .......!!
try { URL blogFeedUrl = new URL (http://blog.teamtreehouse.com/api/get_recent_summary/?count=20); } catch (MalformedURLException e ){
Syntax error on token(s), misplaced construct(s) getting error till URL blogFeedUrl = new URL
and the second error Syntax error on token ":", EmptyStatement expected after this token on (http:
please answer and help
1 Answer
Ethan Lowry
Courses Plus Student 7,323 PointsIn the code you posted there are no quotation marks around the string you are passing in to new URL - is this the case in your actual code as well?
Junaid Shaikh
Courses Plus Student 1,533 PointsJunaid Shaikh
Courses Plus Student 1,533 Pointsgot it Thanxxxxxxxxx
Ethan Lowry
Courses Plus Student 7,323 PointsEthan Lowry
Courses Plus Student 7,323 PointsYou're welcome - in future try and always check carefully through your code for basic errors like this before asking online :)
Junaid Shaikh
Courses Plus Student 1,533 PointsJunaid Shaikh
Courses Plus Student 1,533 PointsOK ..........and thanx again