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 Method Parameter/Argument Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Method Parameter/Argument Question" Watch "Method Parameter/Argument Question" New topic
Author

Method Parameter/Argument Question

marcus conway
Greenhorn

Joined: Oct 30, 2008
Posts: 12
Hello,
I have a method:

What I'm trying to do is obtain input from the user and set their input as the 'String id' parameter in the above Cube(String id, String faceValues) method:

marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

I'm not sure what your question is, but your code above is not doing anything with the String returned by scan.next(). I'm guessing you'll want to assign these to some variables so that you can pass them to a Cube constructor.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
marcus conway
Greenhorn

Joined: Oct 30, 2008
Posts: 12
Originally posted by marc weber:
I'm not sure what your question is, but your code above is not doing anything with the String returned by scan.next(). I'm guessing you'll want to assign these to some variables so that you can pass them to a Cube constructor.


Yes, thats correct. I want to pass them to the ...
Can you explain how to pass the two variables to parameters?


Thanks a lot
Don Solomon
Ranch Hand

Joined: Jul 20, 2008
Posts: 48
I don't know where to begin. First, that is not a method, but it is a constructor. The toUpperCase() method doesn't do anything to the string. You have to capture the return value. I haven't figured out what you are doing with Random.

Find a good book and start from there.


Software development is an exercise in thinking not coding.
 
Consider Paul's rocket mass heater.
 
subject: Method Parameter/Argument Question