heavy = 61 light = 56 weight = 72 attitude = 100 knowledge = 96 intelligence = 115 view = 59 outlook = 109 problem = 81 solution = 125 positive = 115 negative = 83 past = 56 present = 97 future = 91 JuliaRoberts = 150 RobertDeniro = 143 TomCruise = 123 OsamaBinLaden = 110 UnitedStatesOfAmerica = 228 India = 37 UnitedKingdom = 146 Germany = 83 France = 47 NewYorkCity = 168 SunMicroSystem = 213 Microsoft = 118 BillGates = 87
JAVA = 34 Sex = 48 Air = 28 Land = 31
Water = 67 Expert = 88 Idiot = 57 Radio = 47 Television = 130 doctor = 75 Engineer = 77 programmer = 124
----
do it yourself: pass words as command line arguments.
public class AlphaNum
{
public static void main (
String args[])
{
for(int l =0; l < args.length; l++)
{
String []alpha={"A", "B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
int sum = 0;
String
word = args[l];
for(int i = 0; i < word.length(); i++)
{
String ch = word.substring(i,i+1);
for (int k = 0; k < alpha.length; k++)
{
if(ch.equalsIgnoreCase(alpha[k]))
{
sum += k+1;
break;
}
}
}
System.out.println(args[l] + " = " + sum);
}
}
}