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
Kipish [7]
3 years ago
11

What is one property of a good hash code?

Computers and Technology
1 answer:
larisa [96]3 years ago
8 0

Answer:- Major property of a good hash code is that objects which are equal should return the same hash code .

Explanation: Hash codes is a numeric value which  is used for identify a object while a equality testing .Hash code can occupy the value of any length and then returns a fixed length value. The value of hash codes are variable.

If two objects are equal then by the method of equal(object) if the hashcode() function is called on both the objects , they produce the same value.

You might be interested in
Which of the following is not an operating system a) boss b) window xp c) linux d) bindux​
zmey [24]

Answer:

boss is not an os

Explanation:

boss is a former of Linux hope this helped

5 0
2 years ago
Which scenario depicts an ethical workplace practice by a business owner
viva [34]

The answer is D. It's asking for the most UNETHICAL not ETHICAL, the answer before me was ETHICAL. Sharing personal data is UNETHICAL.

4 0
3 years ago
Read 2 more answers
Write a method that computes the sum of the digits in an integer. Use the following method header: public static int sumDigits(l
kifflom [539]

Answer:

The java program for the given scenario is shown below.

import java.util.*;

import java.lang.*;

public class Test

{

   //variables to hold the number, digits and sum of the digits

   //variable to hold number is assigned any random value

   static long num=123;

   static int sum=0;

   static int digit;

   static int s;

   //method to add digits of a number

   public static int sumDigits(long n)

   { do

       {

           digit=(int) (n%10);

           sum=sum+digit;

           n=n/10;

       }while(n>0);

       return sum;

   }

public static void main(String[] args) {

    s = sumDigits(num);

 System.out.println("The sum of the digits of "+num+ " is "+s);  }

}

OUTPUT

The sum of the digits of 123 is 6

Explanation:

1. The variables to hold the number is declared as long and initialized.

2. The variables to store the digits of the number and the sum of the digits are declared as integer. The variable, sum, is initialized to 0.

3. The method, sumDigits(), is defined which takes a long parameter and returns an integer value. The method takes the number as a parameter and returns the sum of its digits.

4. Inside method, sumDigits(), inside the do-while loop, the sum of the digits of the parameter is computed.

5. Inside main(), the method, sumDigits(), is called. The integer value returned by this method is stored in another integer variable, s.

6. The sum of the digits is then displayed to the console.

7. All the variables are declared outside main() and at the class level and hence declared static. The method, sumDigits(), is also declared static since it is to be called inside main().

8. In java, the whole code is written inside a class since java is a purely object-oriented language.

9. In this program, object of the class is not created since only a single class is involved having main() method.

10. The program can be tested for any value of the variable, num.

11. The file is saved as Test.java, where Test is the name of the class having main() method.

7 0
3 years ago
Given the strings s1 and s2 that are of the same length, create a new string consisting of the first character of s1 followed by
LiRa [457]

Answer:

s1='abc'

s2='wxyz'

length=len(s1)

s3=''

for i in range(length):

   s3+=s1[i]+s2[i]

print(s3)

3 0
3 years ago
What is a feature of Accenture’s myNav platform?
ZanzabumX [31]
C because I said so hahahah
6 0
3 years ago
Other questions:
  • Which of the following statements is false?
    12·1 answer
  • Which of the following tends to be true of silent film acting as opposed to sound film acting?
    7·1 answer
  • How do I write code in Java for "A spinner for a game has four possible options: blue, red, yellow, green. The chance of landing
    10·1 answer
  • Help what is a computer made from (computer class question)!!
    9·1 answer
  • ¿Qué es el Internet? ¿Cuál es el protocolo de Internet?
    11·1 answer
  • How is the bootstrap program started?
    6·2 answers
  • I re-made the human version of Daddy Dearest from Friday Night Funkin
    14·2 answers
  • What is a word processing program? Give examples of word processing programs.
    10·1 answer
  • Which of these is most likely to contribute to the long term of a local ecosystem?
    5·1 answer
  • Pleaseeeee helpppppppp​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!