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
“If the information ______________________, then that information (should / should not) be stored because _____________. For exa
lisov135 [29]

The blanks spaces are filled with the following;

  1. Is confidential, should not
  2. There's risk of information theft on the cloud
  3. Social security number, should not

<h3>Confidential information and the storage cloud</h3>

According to McGinley, in some cases, storing any type of personal information for one's self or one's customers in the cloud would be a mistake. Information relating to date of birth, Social Security number, passport numbers should not be kept in the cloud.

This follows from the fact that "Cloud providers are no less bulletproof than any of the other previous industry."

Read more on information storage;

brainly.com/question/24688176

5 0
3 years ago
A boy is sitting to the side of a campfire. He is 5 feet away, but still feels warm. This is an example of:
tiny-mole [99]
This is an Conduction
8 0
3 years ago
Is it safe to tape down cords such as internet cables to the floor?
zhenek [66]

Yes it is safe to tape down cords such as internet cables to the floor

5 0
4 years ago
Which Traffic Source dimensions does Google Analytics automatically capture for each user who comes to your site?A. Source, Keyw
LenaWriter [7]

For each user who comes to your site the google analytics automatically capture the traffic source dimensions Source, Medium, Campaign name.

<u>Explanation:</u>

Source:

  • There cannot be any reference to a website without an origin source.
  • The source is basically the origin of your traffic such as a search engine (google) or a domain (ex: Twitter).

Medium:

  • Every referral to a website also has a medium along with the source.
  • examples are -:  unpaid search, "cost per click", referral, mail.

Campaign name:

  • The campaign Name is the name referring to the google ads campaign.
5 0
4 years ago
Create a function, return type: char parameters: int *, int * Inside the function, ask for two integers. Set the user responses
iris [78.8K]

Answer and Explanation:

In C programming language:

char fun(int*a, int*b){

printf("enter two integers: ");

scanf("%d%d",a,b);

int e;

printf("please enter a character: ");

e=getchar();

return e;

}

int main(int argc, char *argv[]) {

int d;

int f;

int g;

fun();

printf("%d%d%d", d, f, g);

}

We have declared a function fun type char above and called it in main. Note how he use the getchar function in c which reads the next available character(after the user inputs with printf()) and returns it as an integer. We then return the variable e holding the integer value as char fun() return value.

4 0
3 years ago
Other questions:
  • The logical view Select one: a. shows how data are organized and structured on the storage media. b. presents an entry screen to
    7·1 answer
  • In a series circuit, electrons only flow along one path. Given this information, which of the following is an advantage of serie
    15·2 answers
  • The______for our newest game keeps changing as we develop our concept and refine our goals.
    11·2 answers
  • A ____ is a collection of computers and users that are identified by a common security database. workgroup controller segment do
    7·1 answer
  • In a case where electrical current leakage from the circuit occurs, the GFCI would do the following:
    10·1 answer
  • Respuestas de un examen parcial en introducción to computer
    12·1 answer
  • "It's inventiveness ,uncertainty and futuristic ideas,typically deals with science and technology,,what is it called??
    12·1 answer
  • How to unblock a website on a school computer? ASAP who's ever works will get Brainliest and will get a follow.
    14·2 answers
  • True or false: Quality score is an algorithm that scores each of your search ads on spelling and grammar.
    10·1 answer
  • Sharing private information causing a person to be humiliated is considered to be doxing. T or F
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!