JAVA method overloading: Method Overloading is a feature that allows a class to have more than one method having the same name, if their argument lists are different. It is similar to constructor overloading in Java , that allows a class to have more than one constructor having different argument lists. example: // Java program to demonstrate working of method // overloading in Java. public class Sum { // Overloaded sum(). This sum takes two int parameters public int sum(int x, int y) { return (x + y); } // Overloaded sum(). This sum takes three int parameters public int sum(int x, int y, int z) { return (x + y + z); } // Overloaded sum(). This sum takes two double parameters public double sum(double x, double y) { return (x + y); } // Driver code public static void main(String args[]) { Sum s = new Sum(); System.out.println(s.
Posts
- Get link
- X
- Other Apps
FLAGSHIP KILLER 2.0:REDMI K20,PRO MAKE GLOBAL DEBUT redmi k20,pro: redmi has been introduce new flagship killer smart phone announced in china. going by the specification and price,k20 pro promising flagship phone and probably give oneplus 7 series direct compitation.k20 comes midrange segment. specification: k20 pro : it's comes with qualcomm snapdragen 855 processor and 7nm,6.39-inch full hd+ amoled hdr display with in 7th generation under screen finger print sensor. it's covered with frant and back gorilla glass 5 production and 3d glass cover.inside,it comes with a power full 4,000 mah battery with 27w fast charging support and it support quick charge 4.provides 6/64 and 6/120 gb storage. the photography hard ware is triple camera,48mp rear camera(with sony imx 586 sensor,f 1.85 lens) 13 mp wide angle camaera,8mp telephoto lens the back,and 20 mp pop-up selfie camera. price expect with 25000 -28000.India spec was poc