Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use Hasing in Java

843838May 31 2006 — edited May 31 2006
Hello Everyone,

I'm new to java and I need some help regarding Hashing.

I want to calculate the weight of each and every character in string .



package sequenceEditor;

public class MassRenderer {

public static final double A = 71.037114;
public static final double C = 103.00918;
public static final double D = 115.02694;
public static final double E = 129.04259;
public static final double F = 147.06841;
public static final double G = 57.021464;
public static final double H = 137.05891;
public static final double h = 101.04767807;
public static final double I = 113.08406;
public static final double K = 128.09496;
public static final double L = 113.08406;
public static final double M = 131.04048;
public static final double m = 147.035395;
public static final double N = 114.04293;
public static final double O = 114.0793;
public static final double P = 97.052764;
public static final double Q = 128.05858;
public static final double R = 156.10111;
public static final double S = 87.032028;
public static final double T = 101.04768;
public static final double V = 99.068414;
public static final double W = 186.07931;
public static final double X = 163.06333;
public static final double Y = 113.08406;
}

and the string is KLMSVCAVRSQI.

I need to check each character and Calculate its weight using Hashing.

Any help would be appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2006
Added on May 31 2006
2 comments
138 views