This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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..


 
reply
    Bookmark Topic Watch Topic
  • New Topic