Return type

Hi

I have a question.

what's the return type in this code?

Is it setDate?

public void setDate(int day, int month, int year)

Open in new window

bt1942Asked:
Who is Participating?
 
Kevin CrossConnect With a Mentor Chief Technology OfficerCommented:
(void) ==> Nothing is returned.  If you think in terms of subs and functions, this would be a sub.
0
 
Kevin CrossConnect With a Mentor Chief Technology OfficerCommented:
If you need further clarification, see this portion of the Java Tutorials:
http://java.sun.com/docs/books/tutorial/java/javaOO/methods.html
0
 
peetmConnect With a Mentor Commented:
Subroutines are invoked for their 'behaviour' [or 'side effect'], whereas functions are invoked, so that the invokation results in some 'value' - the function is resolved to some value that is then used further in an expression.
0
 
bt1942Author Commented:
Thanks for the comment!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.