Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Quick Question

 
Mark Captain
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10417
63
Eclipse IDE Hibernate Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic