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
[17 PTS] What do you think of puzzle games?
ira [324]

I love puzzle games, I like how they expand your knowledge and make you have to think.

3 0
3 years ago
Hey how are yall today?
Luda [366]

Answer:

Great how are you today?

5 0
3 years ago
Read 2 more answers
Alt +f4 is a short cut of close a document in MS word /ture /false​
vesna_86 [32]

Answer:

True.

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users to type, format and save text-based documents.

In Computer science, there are specific key combinations (short cut) that avail end users the opportunity to perform specific functions without having to go through a series of step.

For example, when you press the Alt button and function key 4 (F4) at the same time, it would close the current open window.

Hence, Alt + F4 is a short cut key that can be used to close a document in MS word.

8 0
2 years ago
When recording data on a multiple-disk storage system, should we fill a complete disk surface before starting on another surface
Cerrena [4.2K]

The user needs to complete the entire disk surface first before starting another surface.

Explanation:

When you are using a multiple disk storage system to write the data the disk automatically writes the disk based on the algorithm for better efficiency and availability of the disk space.

hence when you are recording a data on a multiple disk storage system, it is recommended to fill the complete disk surface initially before you start the another surface to record the data.

4 0
3 years ago
How do design elements and color work together on a web page?
KiRa [710]

Answer:

The answer I believe is: 2. Both Enhance visual appeal.

Explanation:

4 0
3 years ago
Other questions:
  • What is a bus master?
    14·1 answer
  • business owners and managers may first balk at the idea of mobile officer workers because there may appear to be a lack of ___ w
    9·1 answer
  • Consider the following method: public static void arrayMystery(int[] array) { for (int i = 0; i < array.length - 1; i++) { if
    10·1 answer
  • You have been contracted by a local school to evaluate their computer labs for security threats. They are most worried about the
    6·1 answer
  • Which relationship is possible when two tables share the same primary key? one-to-one one-to-many many-to-one many-to-many
    15·2 answers
  • The lightbulb transfers electricity energy into light what is one type of energy that is also generated that is not a desired af
    14·1 answer
  • Name all mario kart games in order
    15·2 answers
  • What factors do network consultants consider when determining the network needs of a business? Use the space provided below to a
    6·1 answer
  • The cameras picture review function allows you to look at the _ you've taken
    8·1 answer
  • Which file is usually the first file to be displayed when you navigate to a website?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!