forked from maheshashokit/27_Java_Full_Stack_Repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFilterMethodOverloading.java
More file actions
32 lines (25 loc) · 1.13 KB
/
FilterMethodOverloading.java
File metadata and controls
32 lines (25 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
public class FilterMethodOverloading {
//Defining the overloaded methods as per our Application Requirement
public String getProductDetails(String brandName) {
System.out.println("**** Getting Product Details Based on BrandName*******");
return "BrandName";
}
public void getProductDetails(String[] brandName) {
System.out.println("**** Getting Product Details Based on Multiple BrandNames********");
}
public void getProductDetails(int minPrice,int maxPrice) {
System.out.println("**** Getting Product Details Based in Min & Max Price**********");
}
public void getProductDetails(float minPrice,float maxPrice) {
System.out.println("**** Getting Product Details Based in Min & Max Price float ******");
}
public void getProductDetails(double minPrice,double maxPrice) {
System.out.println("**** Getting Product Details Based in Min & Max Price double ******");
}
public static void getProductDetails(String brandName,int price) {
System.out.println("Static Method Overloading.......");
}
public static void getProductDetails(int price,String brandName) {
System.out.println("Static Method Overloading-1.......");
}
}