Results 1 to 2 of 2
Thread: Calling on other class methods?
- 10-06-2012, 10:27 PM #1
Member
- Join Date
- Oct 2012
- Location
- Washington State
- Posts
- 2
- Rep Power
- 0
Calling on other class methods?
Hey I'm new to java, and haven't quite figured out some of the class workings...
I'm being asked to create a class called PairOfDice that will create two objects by rolling a pair of dice. Then I need a driver class called BoxCars to operate PairOfDice 1000 times. I don't really know how to call upon the PairOfDice class within the BoxCars class in order to get the two objects. Any help would be greatly appreciated!
-
Re: Calling on other class methods?
BoxCars will hold a PairOfDice variable which will reference a PairOfDice object. You will call the method on the PairOfDice variable.
Similar Threads
-
A class calling methods from external class
By Aaron5466 in forum New To JavaReplies: 4Last Post: 04-16-2012, 11:36 AM -
ActionListener Calling methods from a different class
By JGBowers in forum New To JavaReplies: 16Last Post: 11-25-2011, 01:18 PM -
Calling base class methods
By new2java2009 in forum New To JavaReplies: 1Last Post: 11-15-2011, 10:47 PM -
Calling methods into another class? Help please!
By javanator in forum New To JavaReplies: 1Last Post: 03-20-2010, 06:19 PM -
'Class' Object and calling Static Methods?
By mikeiz404 in forum New To JavaReplies: 2Last Post: 01-24-2009, 05:10 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks