This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is wrong with this code?

 
Mrah Mrah
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


It keeps saying <identifier> expected on the Dice1.roll(); and the next 2 lines

ARGHH. Im new to java and i dont understand what im doing wrong

[ November 27, 2005: Message edited by: Mrah Mrah ]
[ November 27, 2005: Message edited by: Mrah Mrah ]
 
Svend Rost
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

and welcome to the JavaRanch. Let me see if I can give you a few pointers,
so you can continue your school project/assignment.

Before I can help you, I need you to clarify the following:
1)
Why did you locate the method calls where you did? in the class P4_4

2)

Please explain the "public interface" of the Die class (i.e. it's public
methods). Btw. according to the "Java naming convention" we name references
or variables with a lowercase character as the first character (e.g.
Person svend = new Person())

3)

What's die1 and die2?

4)

Please take an extra look at the lefthand side of this assignment.


Happy coding.

/Svend Rost
 
Chad Clites
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not to mention it is not nice to post the same question at multiple forums..


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic