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
Computer a sends a packet intended to reach computer f. along its path it arrives at computer
disa [49]
<span>To the computer f, this answer is because when reading the statement I assume that there is no type of connection and / or communication between the computer a and c; therefore to be profitable the computer c should return the package sending it back to computer f.</span>
5 0
3 years ago
The blank contains the computer's brain the central processing unit CPU
Mila [183]

The Motherboard contains the computer's brain which is the Central Processing Unit (CPU).  It is the main circuit board for the computer, containing both soldered, non removable components along with sockets or slots for components that can be removed. The motherboard holds the CPU, RAM and ROM chips, etc.

7 0
3 years ago
Which table option automatically adjusts column widths to fit cell content? autofit contents merge cells autofit window fixed co
noname [10]
Which table option automatically adjusts column widths to fit cell content?
autofit contents
6 0
3 years ago
What is an easy and accurate way that a graphic designer can increase the size of a digital shape while keeping the ratio of hei
VikaD [51]

Answer:

Open the shape’s properties window, and type the height value multiplied by 2 and the width value multiplied by 3.

Explanation:

7 0
3 years ago
Read 2 more answers
What is the purpose of creating a primary key in a database
ss7ja [257]

Answer:

Basically it creates a unique identifier for each row in your table and that can help you link your table to other tables using primary key as link

Explanation:

"Primary key allows you to create a unique identifier for each row in your table. It is important because it helps you link your table to other tables (relationships) using primary key as links."

7 0
3 years ago
Other questions:
  • You need to immediately terminate process id 2129. which command should you use?
    15·1 answer
  • HELP! Identify the parts of the table. <br>A) Primary Key<br>B) Field<br>C) Record<br>D) Table<br>​
    15·2 answers
  • The concept of plug and play" is demonstrated by which of the following
    15·1 answer
  • 23. For the 16-bit binary number 1001 0101 1100 0011, show the effect of: a. A right shift of 4 bits with zero fill. b. A right
    13·2 answers
  • A top-notch IT company is seeking an experienced leader to direct a team of experts in the development, creation, and modificati
    14·2 answers
  • Optimally, the __________ guides investment decisions and decisions on how ISs will be developed, acquired, and/or implemented.
    6·1 answer
  • Write a Java program in jGRASP that creates a 2D integer array of 5 rows and 20 columns, fills it with increasing integer values
    13·1 answer
  • What is are motor vehicle emissions?
    8·1 answer
  • Jiwoo is a professional photographer. Identify and describe a photography scenario where Jiwoo would need to consider the ethics
    12·1 answer
  • QUESTION 44 To determine whether a character entered is a letter of the alphabet, use the ________ function. isdigit fromkeyboar
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!