Reputation: 8603
public UserDefinition getTestUser(String userName) {...}
UserDefinition
is a class, getTestUser
is a function. What does this really mean?
A function that is named getTestUser
is part of the class of UserDefinition
?
Or I am wrong with that? What is the term for this kind of way writing a function in java?
Btw above function is a method of another class.
Upvotes: 1
Views: 3406
Reputation: 124225
Based on: https://docs.oracle.com/javase/tutorial/java/javaOO/methods.html
(BTW in OOP functions and procedures are called "methods")
┌modifiers
| ┌return type
| | ┌method name
| | | ┌parameter list
| | | | ┌exception list
| | | | | ┌method body
public UserDefinition getTestUser(String userName) [throws ...] {...}
\ method signature /
\ (name + parameters) /
Upvotes: 4