Question: Why is there an error in the following code? package mid; 1 2 P m ST LO 10 7 CO 9 10 - 14
Why is there an error in the following code? package mid; 1 2 P m ST LO 10 7 CO 9 10 - 14 15 public class OverDemo { public static void func1(int x, double y) { } } public void func1 (double a, double b) { } public static void main(String[] args) { Over Demo od = new OverDemo (); od. func1(2,2.5); Over Demo.funcl (2.3, 1); }
Step by Step Solution
There are 3 Steps involved in it
The error in the provided code is that the method func1 is defined twice but with different signatur... View full answer
Get step-by-step solutions from verified subject matter experts
