• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Beginner Java Help *please*

dOrKuS

Senior member
I'm having some trouble understanding constructors 😱 and was hoping one of you java gurus could help me out real quick.

I'm not sure what I'm supposed to do with the fourth line here (about creating the constructor)

The rest of the problem shouldn't be difficult, it's just the constructor I need help with.

Feel free to reply here or pm me.

Thanks,
Brian
 
Yup just learn how to make a constructor and write the MonetaryCoin object.

Constructor should have some values sent into it when it is created or called on from main class of the other file.
 
an example...

public class MonetaryCoin
{
private int n;

public MonetaryCoin(int n)
{
this.n = n;
}

public int getValue()
{
return n;
}
}
 
Back
Top