• Post Reply Bookmark Topic Watch Topic
  • New Topic

A Class Type as a parameter  RSS feed

 
Veronica Love
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

Would anybody know of some reading information explaining the fundamentals of using a class type as a parameter for a method. For example something like public int countByDate(Date date).... Where the data type Date in the parameter is referring to a different class. Just not too sure what is going on here because I'm use to seeing parameters in methods with primitive data types. (int, char, float etc).

Thank you.
 
Campbell Ritchie
Marshal
Posts: 56581
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I presume by class type you mean reference type? I thought at first you were planning to pass an instance of the Class class.
It should be in the basics of the Java Tutorials.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!