subject

(method overloading)

given the following methods, write down the printed output of the method calls:

public static void dosomething(string x) { system. out. println("a");
}
public static void dosomething(int x) { system. out. println("b");
}
public static void dosomething(double x) { system. out. println("c");
}
public static void dosomething(string x, int y) { system. out. println("d");
}
public static void dosomething(int x, string y) { system. out. println("e");
}
public static void dosomething(double x, int y) { system. out. println("f");
} method calls
1. dosomething(5);
2. dosomething (5.2, 9);
3. dosomething(3, "hello");
4. dosomething("able", 8);
5. dosomething ("alfred");
6. dosomething (3.6);
7. dosomething("world");

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 12:30, zaratayyibah
Which of the choices sean are not true when considering virus behavior
Answers: 1
image
Computers and Technology, 23.06.2019 02:30, jalaholmes2027
Three out of five seniors remain undecided about a college major at the end of their senior year.
Answers: 3
image
Computers and Technology, 23.06.2019 15:00, victordhernandez01
Jake really works well with numbers and is skilled with computers but doesn't work well with others. which of the jobs discussed in this unit might be best for jake? why?
Answers: 3
image
Computers and Technology, 23.06.2019 18:40, brooklyn4932
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
You know the right answer?
(method overloading)

given the following methods, write down the printed output of the...

Questions in other subjects:

Konu
Mathematics, 26.11.2020 07:00
Konu
Mathematics, 26.11.2020 07:00
Konu
Chemistry, 26.11.2020 07:00