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 Quick Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Quick Question" Watch "Quick Question" New topic
Author

Quick Question

Mark Captain
Ranch Hand

Joined: Nov 01, 2011
Posts: 30
public void printReport(int numberRolls, DiceAccumulator totals)


public boolean equals(Stock object2)


public DiceAccumulator runSimulation(int numberRolls)



The bold word, Why is it not a data type like I have been learning.
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
They are references to the classes you cited in bold.

Similar to below where String and Object are the class types



In below the method printDogName() takes the reference that is a type of Dog as its input...



Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8398
    
  23

Mark Captain wrote:The bold word, Why is it not a data type like I have been learning.

It is.

If, as John says, they are classes, then they're a very specific data type; but something like Stock could just as easily be an interface, in which case it is most assuredly a type, in any sense of the word.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Quick Question