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 trialJoseph Wagner
Android Development Techdegree Graduate 27,137 PointsDeprecated Annotation Code Challenge
I'm trying to pass this code challenge but I think there's something wrong with the challenge. It says I need to take a long parameter although the description says int. Does anyone see what I'm doing wrong here?
As the lead developer of an online music service, you have decided to remove the existing buyAlbum method. You'll replace it with a new void buyAlbum method that instead accepts an int parameter for the album ID. Deprecate the existing method and add the method described to the MusicServiceUser class. You don't need to include any code within your new method.
public class MusicServiceUser {
@Deprecated
public void buyAlbum(String albumName) {
// Leave this blank
}
public void buyAlbumNew(Long albumId) {
//
}
}
2 Answers
Rares Conea
Courses Plus Student 15,000 PointsHi,
You are using a wrong name for your method, just change the name of your new method to be the same as the existing one and give it an int albumID parameter:
Norwel Winya
6,807 Pointshie the question want you to change the parameter only. u was suppose to use (int) instead of Long