File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes What is wrong with this code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is wrong with this code?" Watch "What is wrong with this code?" New topic
Author

What is wrong with this code?

Mrah Mrah
Greenhorn

Joined: Nov 27, 2005
Posts: 1


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

Joined: Oct 23, 2002
Posts: 904
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

Joined: Aug 16, 2005
Posts: 134
Not to mention it is not nice to post the same question at multiple forums..


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is wrong with this code?