• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is wrong with this code?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not to mention it is not nice to post the same question at multiple forums..


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic