Class 10 ICSE - Java
Class 10th Java aims to empower students by enabling them to build their own applications introducing some effective tools to enable them to enhance their knowledge, broaden horizons, foster creativity, improve the quality of work and increase efficiency.
It also develops logical and analytical thinking so that they can easily solve interactive programs. Students learn fundamental concepts of computing using object oriented approach in one computer language with a clear idea of ethical issues involved in the field of computing
Class 10th java topics includes revision of class 9th, constructors, user-defined methods, objects and classes, library classes , etc.
Polymorphism
If a function behaves differntly for different objects then this is known as polymorphism.
Function overloading is an example of polymorphism.
Method Overloading
The functions having the same name but have different numbers of parameters passed to it, which can
have different data types like int, double, float and used to return different values are known as
overloaded method. This process is known as function overloading
Consider the above two declarations :
The above mentioned two methods have the same name but different parameter declaration if you call
min() with int parameter then min() method that expects int parameter will be invoked and if you
call min() with double parameters the min() method that expects double parameters will be invoked.
This referred to as method overloading and method min() is said to be overloaded

Advantages of Method Overloading
(i) Overloading provides the ability to create multiple methods of the same name, but with different
parameters.
(ii) The main advantage of this is cleanliness of code.
(iii) It increases the readability of the program.
Defining Overloaded Methods
You can overload a method by two ways :
(i) By changing the no. of arguments.
(ii) By changing the data types.


Invoking Overloaded Methods
In this example, we have created four overloaded methods (first three method overload by changing
no. of arguments and last one method overloaded by changing there data type).
