JAVA SEMINAR NOTES
Methods: A method is a block of code that performs a specific task.
Example: hello() prints Hello. Output: Hello.
Parameters: A parameter is a variable that receives a value when a method is called.
Example: add(10,20). Output: 30.
Method Overloading: Same method name with different parameters.
Example: add(int,int) and add(double,double). Output: 11 and 7.7.
Scope: Scope is the area where a variable can be accessed.
Types: Local Scope (10), Block Scope (20), Instance Scope (30), Class Scope (40).