
public class TestVarArgs { Public void display(Double i, double â?¦ j) { System.out.println(â??Double& var argsâ??); } Public void display(Double i, Double j) { System.out.println(â??Double &Double calledâ??); }
Public static void main(String args[]) { New TestVarArgs().display(56.5,76.7); } }
Output/
a) output Double & Varargs b) output Double & Double c) compilation error due to ambiguous method calls d) compliation error at line 9 informing (Double, Double) cant be applied to (double, double)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.