-
Mar 18th, 2014, 12:41 AM
#1
Thread Starter
Lively Member
[RESOLVED] Need an explanation of a java function
Hello Java lovers,
I have query about java hashcode method
what is difference in between hashcode and array.hashcode
what is the output of hashcode("a") and array of hashcode("a","b")
Actually i don't understand how array of hashcode works,thats why need explanation about those
reply on various posts make you a power poster,may not being u a helpful poster,if u dn't understand how u help then dn't need to reply,it increases ur post count,but decreases ur worthness
-
Mar 18th, 2014, 08:06 AM
#2
Re: Need an explanation of a java function
I'm no Java expert (or user for that matter) but I'd have to guess that hashcode returns a single value - the hash of the passed in string... array.hashcode on the other hand would produce an array of hashcodes, one for each string parameter passed in.
But that's jsut my guess.
-tg
-
Mar 18th, 2014, 01:18 PM
#3
Thread Starter
Lively Member
Re: Need an explanation of a java function
oh first of all,thanks to you for your response.
string a = "a" then a.hashcode = 97 that's a single parameter
then char a = new array {a,b} and a.hashcode means combination of both array hashcode value,or something
actually,i wanna convert java array hashcode to vb6 and i have single hashcode function
now i expecting whats going on array hashcode in java that i can convert for vb6
reply on various posts make you a power poster,may not being u a helpful poster,if u dn't understand how u help then dn't need to reply,it increases ur post count,but decreases ur worthness
-
Mar 18th, 2014, 01:49 PM
#4
Thread Starter
Lively Member
Re: Need an explanation of a java function
oh first of all,thanks to you for your response.
string a = "a" then a.hashcode = 97 that's a single parameter
then char a = new array {a,b} and a.hashcode means combination of both array hashcode value,or something
actually,i wanna convert java array hashcode to vb6 and i have single hashcode function
now i expecting whats going on array hashcode in java that i can convert for vb6
reply on various posts make you a power poster,may not being u a helpful poster,if u dn't understand how u help then dn't need to reply,it increases ur post count,but decreases ur worthness
-
Mar 26th, 2014, 05:20 PM
#5
Addicted Member
Re: Need an explanation of a java function
Check the Java docs http://docs.oracle.com/javase/7/docs...il/Arrays.html
String a = "a" per the java docs is returning the hashcode for the string object.
array.hashCode() per the java docs Returns a hash code based on the contents of the specified array.
Last edited by smendoza; Mar 26th, 2014 at 05:30 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|