Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7504489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:35:26+00:00 2026-05-29T21:35:26+00:00

newbie doing Java homework here. I have one class named Album which contains the

  • 0

newbie doing Java homework here. I have one class named Album which contains the following constructors:

public class Album {

    private String title;
    private String artist;
    private String genre;
    private Song favoriteTrack;
    private int trackNumber;
    private static int numAlbums;

    //Constructors
    public Album(String title, Song favoriteTrack, int trackNumber) {
        this.title = title;
        this.favoriteTrack = favoriteTrack;
        this.trackNumber = trackNumber;
        artist = favoriteTrack.getArtist();
        genre = favoriteTrack.getGenre();
        numAlbums++;
    }

    public Album(String title, Song favoriteTrack) {
        this(title, favoriteTrack, 1);
    }
...}

And then I have a second class MusicCollection which instantiates the Album class thrice, within its main method…

public static void main (String[] args) {...

    Album album1 = new Album("Debut", "Venus as a Boy", 3);
    Album album2 = new Album("Homework", "Around the World", 7);
    Album album3 = new Album("Ghost in the Machine", "Invisible Sun", 3);
    ...}

However, when I attempt to compile MusicCollection.java, I get the error:

cannot find symbol
symbol : constructor Album(java.lang.String,java.lang.String,int)
location : class Album

for each time I try to call the constructor.
The classes Album and MusicCollection ARE in the same directory, and Album.java compiles.
I imagine I’m doing something silly, but I can’t figure this out.
Any help would be much appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:35:29+00:00Added an answer on May 29, 2026 at 9:35 pm

    The second argument of the constructor you defined is Song, not String, but in your main, you try to instantiate it with a String as a second argument.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Newbie here...can I write one program which incorporates .NET LINQ and also various Java
Newbie question. I have Django models that look like this: class Video(models.Model): uploaded_by =
I'm a newbie doing Objective-C, coming from Flex/Actionscript development. I have an iPhone app
Rails newbie here so just want to be sure I'm doing this right. I
I am a newbie in iPhone development, doing my first app. I have some
I'm a java newbie but I'm not sure what I'm doing wrong. When I
OK - Python newbie here - I assume I am doing something really stupid,
C++ newbie question. Please, verify I'm doing it right. I have a global application
I am newbie in java but I think I have done well teaching myself
Shell newbie here. I'm not sure what I am doing is a good way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.