1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Digiron [165]
3 years ago
12

Given the following method definitions: void mystery(double a) { System.out.print("double! "); } void mystery(int a) { System.ou

t.print("int! "); } What will be the output of the following code? mystery(1); mystery(1.0); Select one:
a. It is impossible to predict
b. int! double!
c. Duplicate function names results in a compiler error.
d. double! int!
Computers and Technology
1 answer:
kicyunya [14]3 years ago
6 0

Answer:

The correct answer to the following question is option "b".  

Explanation:

The method having the same name but the arguments have different so it is called method overloading. It is a part of the object-oriented programming language (oops).  

  • In the given code we define same method two times that is "mystery()". but in this method, we pass two different parameters. For the first time, we pass a double variable that is "a" as a parameter. In the second time, we pass an integer variable that is "a" as a parameter and in both functions, we write some codes.
  • In the calling time, we call function two times. In first time calling we pass an integer value that is "1" and second time calling we pass double value that is "1.0". So the output of this code is "int! double!".  

That's why the option "b" is correct.

You might be interested in
the first thing to do when your computer gives you an error message is A restart the computer B press the F2 key C write down th
lesya692 [45]

Answer:

I think you should restart the computer

6 0
1 year ago
Which of the following SQL statements will display all customers who have not recently placed an order? a. SELECT customer# FROM
JulsSmile [24]

Answer:

The correct option is option 4 from the options indicated below:

Explanation:

The options are as given below

1-SELECT customer# FROM customers

UNION

SELECT customer# FROM orders;

2-SELECT customer# FROM orders

MINUS

SELECT customer# FROM customers;

3-SELECT customer# FROM orders

INTERSECT

SELECT customer# FROM customers;

4-SELECT customer# FROM customers

MINUS

SELECT customer# FROM orders;

Option 1 is not correct as it will provide the list of all the customers whether they have placed order or not.

Option 2 is not correct as it will provide the list of customers who have placed order but are not in the customers table. This will return the empty records.

Option 3 is not correct as it will provide the list of customers who have placed the order.

Option 4 is correct as it will provide the list of customers from the CUSTOMERS table which are not in the Orders table. thus the list of customers who have not placed the order yet.

3 0
3 years ago
What are the pros and cons of using ICT
qaws [65]

Answer:

Pros:

- Connect with friends, family in a short period of connecting time

- Faster, easier than paper

- The messages can be stored in the device for longer times, without being damaged, unlike paper files that easily get damages

- Digital communication can be done over large distances through internet and other things.

And many other pros

Cons:

- Software can be easily hacked

- Digital Communication has completelymake people become far to others. They would stop meeting face-to-face but instead of that, video call, chatting is become more popular

- Most of devices have hidden recording mechanisms that can take your information unknowingly and may be used to attack you in the future

And many other cons

Hope this helped :3

5 0
4 years ago
You are trying to appreciate how important the principle of locality is in justifying the use of a cache memory, so you experime
murzikaleks [220]

Answer:

Explanation:

Attached is the solution

3 0
3 years ago
What type of computer/device do you have i need it for a survey and it due today soooooooooooooo
Xelga [282]

Answer:

ooh I have a I phone computer

5 0
3 years ago
Other questions:
  • Web design people please help!
    7·1 answer
  • What does subscribing to a website’s RSS feed provide to a subscriber?
    10·1 answer
  • Think about the five steps to writing an algorithm. Why is each step necessary? Why is it important to be precise when writing c
    15·1 answer
  • The set of communications rules for exchanging information electronically on the internet is called the ________.
    10·1 answer
  • Enterprise Resource Planning (ERP) is an example of a single user database.
    7·1 answer
  • You can rotate a selected graphic by dragging a ________ rotation handle
    13·1 answer
  • Which is the most popular language used in game programming?
    5·2 answers
  • Which one is the right code
    10·1 answer
  • What is computer assisted translation​
    9·1 answer
  • Active directory and 389 directory server are both compatible with which directory access protocol?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!