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
0 Endorsements
Ranked #55.0K
1 Posted Topic
Re: 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"); … |
The End.