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
densk [106]
3 years ago
15

What output is produced by the following code? Integer first = new Integer(7); Integer second = first; if (first == second) Syst

em.out.println("Sneezy"); else System.out.println("Grumpy"); if (first.equals(second)) System.out.println("Sleepy"); else System.out.println("Doc"); Sneezy Sleepy Sneezy Doc Grumpy Sleepy Grumpy Doc
Computers and Technology
1 answer:
fenix001 [56]3 years ago
6 0

Answer:

The correct output of this question is  "Sneezy Sleepy".

Explanation:

In the given code firstly we create the object of the integer class that is first in this we pass the integer value that is 7. Then we declare another second integer variable is this variable we pass object as a reference. Then we use the two conditional statements. In the first, if block we check that the object of the class is equal to the reference variable. If it is true it prints Sneezy. otherwise, it will print Grumpy. In second if block we check that the object of the class is equal to the reference variable. but in this time we the equals() function it is the same as(==). If the condition is true it prints Sleepy. otherwise, it will print Doc. So the output of the code is Sneezy Sleepy.

You might be interested in
Why is 0.3333333333333333 the output of print(1/6 + 1/6) in python?
Alisiya [41]

Answer:

because 1/6 + 1/6 is 2/6 which is 1/3 and 1/3 is 0.333...

Explanation:

5 0
3 years ago
Betrand Meyer developed the ______ programming language which is not type-safe because it violates the law of contravariance.
frozen [14]

Answer:Eiffel programming

Explanation: Eiffel programming language was base on object-oriented pattern and developed by Betrand Meyer in 1986.This helps in creating the software modules that can be used again and is reliable as well.

This language was not considered as type safe because it could execute the operation on any particular object which is considered invalid on it.This language lacks about ensuring the program that are written are well defined or not.

4 0
3 years ago
In dos operating system ,write a command to delete the directory as well as the files of the directory ''world'' on drive E.
Sergeeva-Olga [200]

Answer:

deltree /y E:\world

Note that the /y option simply tells it to go ahead and answer yes to any confirmation prompts that might occur.  Not necessarily part of the desired answer.

Explanation:

The deltree command tells the system to recursively delete a directory and its contents.

3 0
3 years ago
When was the first analog device, the phonautograph, launched?
Nataly_w [17]

Answer:

1860

Explanation:

4 0
2 years ago
When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This adjustm
Ksivusya [100]

Answer:

5.23 LAB: Adjust values in a list by normalizing When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers.

Explanation:

7 0
3 years ago
Other questions:
  • give two main reasons that should be considered when preparing and deploying a functional restoral scenario.
    5·1 answer
  • Camera shock might happen if you do which of the following to your camera?
    6·2 answers
  • Which command can be used to manually add a package to the driver store?
    13·1 answer
  • Write an expression to print each price in stock_prices. Sample output with inputs: 34.62 76.30 85.05
    9·1 answer
  • Write a function to output an array of ints on a single line. Funtion Should take an array and an array length and return a void
    9·1 answer
  • What is the most likely cause of a print job rendering the wrong colors on the output?
    14·1 answer
  • Which part of a touchscreen responds to pressure applied to its surface?
    6·1 answer
  • if you were determining what was expected of you simply by looking at media, what messages would you take away?
    8·2 answers
  • Explain ONE negative outcomes of not matching an ICT product to the correct audience:
    15·1 answer
  • Taran wants to work in the technology field but is unsure of which career to pursue. He has been told he has strong people skill
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!