Method Overloading
Method Overloading
The concept of method overloading is used when creating the same method repeatedly in the same class. This can be done by changing the parameter, which is called the method signature.
Figure 2: Method Overloading Example |
Access Modifiers
The security which is used to access classes, methods and variables, is called modifiers. there are 4 types of modifiers.
- Public
- Project, class in the project and other related classes can access.
- Protected
- Class, package and sub classes can access.
- Default
- Class and package can access.
- Private
- Only the class can access.
Static
Static is a keyword that cannot be changed but used as a modifier. Variables, methods, classes in a class can be accessed from anywhere in it using the "static" keyword.
Figure 3: static keyword Example |
Comments
Post a Comment