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
How can i clear the CMOS​
motikmotik

Explanation:

Steps to clear CMOS using the battery method

Turn off all peripheral devices connected to the computer.

Disconnect the power cord from the AC power source.

Remove the computer cover.

Find the battery on the board. ...

Remove the battery: ...

Wait 1–5 minutes, then reconnect the battery.

Put the computer cover back on.

4 0
3 years ago
To what extent do you think st. cyprian was effective in his efforts to bring inherited christian teachings to bear on the unpre
Pepsi [2]

St. Cyprian of Catharge is a bishop who is often called the African Pope. His martyrdom justified his status and showed his holiness through the judgments of the church. His assertions strongly propose that he is conscious that he is in a situation that he is being slated for intensifying and spreading the factional partition through rigorist inflexibility by his adversaries in Rome. He knew that the advertising line” Feticissimus” together with his troupe would be vending in Rome. 

4 0
3 years ago
Please Answer Quickly
leonid [27]

Answer:

graphic design and digital marketing solutions

3 0
3 years ago
Read 2 more answers
HELP ASAP PLZZZZZ
musickatia [10]

Answer:

third one

Explanation:

3 0
2 years ago
When was the idea of the cloud first developed?<br><br> 2000s<br> 1990s<br> 1960s<br> 1980s
kondaur [170]

Answer:I would say 1980 is the answer or The answer is B 1980.

5 0
3 years ago
Other questions:
  • OSI is a seven-layered framework used to help define and organize the responsibilities of protocols used for network communicati
    6·1 answer
  • Change control in application development is a formal process for changing written documentation into online documentation, and
    13·1 answer
  • How can you add and remove categories from a previously created chart? A. Click the Format tab. B. Click the Chart Styles button
    13·2 answers
  • Computer virus is a<br> a. software<br> b. hardware<br> c. bacteria<br> d. none of these
    13·1 answer
  • In the United States, everyone is guaranteed work true or false
    13·1 answer
  • Which of the following means to find and fix errors in code?Which of the following means to find and fix errors in code?
    5·1 answer
  • Java code?????
    12·1 answer
  • Why use LinkedIn automation for LinkedIn?
    10·1 answer
  • Justice wrote a program and forgot to put the steps in the correct order. Which step does she need to review?
    5·2 answers
  • What is your favorite song? mine is "In the final"
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!