Learn Java: Tutorials for Beginners and Intermediate Programmers | Methods and Constructors in Java

Опубликовано: 05 Ноябрь 2024
на канале: Leela Soft
164
35

#Types of #Methods in #Java:
1.instance methods
2.static methods

Method Parameters and Method Return Type:
1.Method with no parameters and no return type.
2.Method with no parameters and return type.
3.Method with parameters and no return type.
4.Method with parameters and return type.

Parameter as a String (non-primitive)
Parameter as a User Defined Class (non-primitive)
Return Type as a User Defined Class (non-primitive)

Constructors:
Types:
1.Default Constructors
2.Parameterized Constructors

Creation: By using Class Name, without return type.