Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

question about java/netbeans?

here is a little chunk of code:

1import java.util.*;

2

3public class Skill {

4 private int rat;//skill rating

5 private String spec;//specialization

6 private Attribute linked;//linked attribute

7 public int mod;//any additional dicepool modifiers

8 private int pool;//the total dicepool

9}

10public Skill(int rating,int modifier,Attribute att){

11 rat=rating;

12 mod=modifier;

13 linked=att;

14 pool=rat+att.getAugRat()+mod;

15}

now netbeans is telling me that a class interface or enum is expected for lines 10,12,13,14, but not 11. I have no idea why this might be. Attribute is an object i created in the default package, but as you can see rat mod and pool are just integers. it also had this problem with a string before i removed it. i also noticed that attribute is not highlighted in blue as int is (to indicate that it is a recognized object). can anyone tell me what might be the cause of this?

1 Answer

Relevance
  • 10 years ago
    Favorite Answer

    Put the "}" from line 9 after line 15.

Still have questions? Get your answers by asking now.