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
svetoff [14.1K]
3 years ago
7

How do you do these questions? The first two questions could have multiple answers and the third is one answer only.

Computers and Technology
1 answer:
mr_godi [17]3 years ago
8 0

Answer:

1. c is the correct option, a and b are false

2. It is always desirable that all the object instance variables contribute to calculating the hash code.

3..( getfirstname +getSecondName).Hashcode()

Explanation:

1. Two same hashcode cannot be in same hashset, and if two keys are equal then it does not mean, their hash code should also be equal. And if a key is greater, then its hashcode will definitely be greater.

2. Each object instance variable must contribute to calculating the hash code, as we need one hash code for each key or object. However, set.Contains(Obj) must return true if we have a hash code for that object, as it must be present in HashSet then.

3. Also for each of the key we need one hash code, and here the first name and the last name together are making one key, and hence we should concatenate both, and then generate a hash code for that concatenated key, and hence the correct option is (getFirstName + getSecondName).Hashcode()

You might be interested in
P*********** is considered a serious social problem justify this statement​
vredina [299]

Answer:

I think it's not a social problem but they are doing that by their own choice . but if the girls are forced to do that is the social problem

7 0
3 years ago
Read 2 more answers
In ANSI standard C(1989) code - this is what we are teaching- declarations can occur in a for statementas in
tatiyna

Answer:

true is the answer to this

8 0
3 years ago
In a dark place you have only a match , a twig , campfire logs , and oil lamp and a candle which do you literally first /
ohaa [14]

Answer:

You would use a twig first :)

Explanation:

3 0
3 years ago
Who want to be my friend
Tanya [424]

Answer:

I willl be your friend

Explanation:

Ther is no explanation

8 0
3 years ago
Read 2 more answers
How to add if an statemement on a retrun in react js.
miv72 [106K]

Answer:

Of course, if we think about if statement in Javascript or Typescript logic, it’s the same as in every Javascript or Typescript place.

It’s just if/else like pure javascript, but in this case, we won’t talk about the normal if/else.

In react, we’ll need if statements for the one more thing, it’s the rendering.

It’s named “Conditional rendering”, but to make it simple, let’s stay with “if statement in react”.

There are the two most popular ways to use conditional rendering that we’ll see in the React.js code, and depends on a case, both of them are correct.

The first way that we can use is to define the conditional rendering directly in the components layout.

It’s quick and easy that we’ll use the most, and in some cases, it is the best for performance.

We’ll be using this way in the cases when we have only one condition, more just as “if”, when we would like to render some element when a specified condition is passed.

The second way is the function created to handle specified parts of the layout, and render it conditionally, to do that we can use not only if/else but the switch case as well.

This one way is right to use in cases where we have more conditions, especially the version with switch one.

But it fires the function anyway, so it is no sense to use it when we have one condition.

Let’s take a look at the code examples where I added both ways of doing that:

// The first example with the code inside functional component

function Parent(props) {

 return(

   <>

     {name === "Duomly" && (

       <DuomlyComponent/>  

     )}

   </>

 )

}

// The second example with the additional function

function renderComponent() {

 const name = 'Duomly';

 if (name === 'Duomly') {

   return 'Duomly';

 } else {

   return null;

 }

}

function Parent(props) {

 return renderComponent();

}

Explanation:

3 0
3 years ago
Other questions:
  • In your opinion, what is the best practice for organizing files within your computer?
    15·2 answers
  • When writing about environment concerns, which topic would demonstrate civic-mindedness on a global scale?
    11·2 answers
  • I'm looking for the best free chat website to Answer computer and statistic question and answers
    10·2 answers
  • The find and
    10·1 answer
  • Where is voice data stored in Android?
    11·1 answer
  • Which network device regenerates the data signal without segmenting the network? modem?
    15·1 answer
  • Which of the following are common data types? Check all that apply.
    6·1 answer
  • Compare and contrats the vain digestive system from the human digestive system.​
    10·1 answer
  • Ask the user to input a country name. Display the output the message "I would love to go to [country]"
    8·1 answer
  • A ________________ is a special type of array that implements a last-in, first-out collection of values.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!