As we go through looking at UML diagrams we will notice certain terms that are used in java. Here is a list of methods and what they mean:
private – this causes the property or method to not be accessible outside of the class. Only the code in the class can call those properties and methods. In UML we use a – sign next to a property or method.
static – this makes it so that we don’t need an object to be able to call a method or property from a class. These can be seen as underlined properties or methods within a UML diagram.
public – we can call the properties and methods from outside of the class. In UML we use a + sign next to a property or method.
final – once we set the value for this variable, we can’t change it in the future. You can find final variables in ALLCAPS and underlined in UML.
void – this lets us know that a method is not meant to return anything, it will do some action only.
new – this creates a new object from a Class.