Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #55.0K
~2K People Reached
Favorite Forums
Favorite Tags
java x 3

1 Posted Topic

Member Avatar for niamul

Was doing a research about it too. Got a simple solution, don't know if it is the best. The String Class has a hashCode method that return the String hashcode (int) so u can do as this: String name = "Victor"; switch (name.hashcode()) { case "Victor".hashCode() : System.out.println("Name is Victor"); …

Member Avatar for jon.kiparsky
0
2K

The End.