Public class myclass
{
private map map;
public myclass()
{
map = ne...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 26.12.2019 01:31 gwendallinesikes
Public class myclass
{
private map map;
public myclass()
{
map = new hashmap< > ();
map. put("foo", 1);
map. put("bar", 3);
}
public int getvalue(string input, int numretries) throws exception {
try {
return map. get(input);
}
catch (exception e) {
if (numretries > 3) {
throw e;
}
return getvalue(input, numretries + 1);
}
}
}
question: how many times will 'getvalue(…)' execute with the following inputs, and what will be the result?
(1) getvalue("foo", 0);
(2) getvalue("bar", 2);
(3) getvalue("baz", 0);
(4) getvalue("fubar", 1);
my answer is as follows, i would just like to see if it is correct:
1) runs getvalue 1 time and returns 1
2) runs getvalue 1 time and returns 3
3) runs getvalue 3 times and throws an exception after the third run
4) runs getvalue 2 times and throws an exception after the second run
in total getvalue runs 7 times.
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 19:00
How is the number 110 written when expanded out to place values in the base 2 (binary) number system? options: 2 x 4 + 3 x 2 + 4 x 1 1 x 2 + 1 x 2 + 0 x 2 1 x 100 + 1 x 10 + 0 x 1 1 x 4 + 1 x 2 + 0 x 1
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 23:30
For her science class, elaine is creating a presentation on weather in the united states. she wants to make the presentation beautiful and interesting by drawing simple cloud or wave shapes. which is the best way for elaine to draw these shapes?
Answers: 1
![question](/tpl/images/cats/informatica.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 15:30
Python. primary u.s. interstate highways are numbered 1-99. odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. thus, the 405 services the 5, and the 290 services the 90. given a highway number, indicate whether it is a primary or auxiliary highway. if auxiliary, indicate what primary highway it serves. also indicate if the (primary) highway runs north/south or east/west.
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/health.png)
Health, 19.01.2021 23:40
![question](/tpl/images/cats/en.png)
English, 19.01.2021 23:40
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 19.01.2021 23:40
![question](/tpl/images/cats/mkx.png)
Arts, 19.01.2021 23:40
![question](/tpl/images/cats/ekonomika.png)
Business, 19.01.2021 23:40
![question](/tpl/images/cats/mat.png)
Mathematics, 19.01.2021 23:40
![question](/tpl/images/cats/fizika.png)
Physics, 19.01.2021 23:40
![question](/tpl/images/cats/biologiya.png)
Biology, 19.01.2021 23:40
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 19.01.2021 23:40
![question](/tpl/images/cats/ekonomika.png)
Business, 19.01.2021 23:40
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 19.01.2021 23:40
![question](/tpl/images/cats/istoriya.png)
History, 19.01.2021 23:40