Be Humble... Be Nice.
Be Humble... Be Nice.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joanne
Originally posted by Arjun Reddy:
Convert a String say, "Hello" to an integer primitive type?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Brazil - Sun Certified Java Programmer - SCJP 5
http://www.camilolopes.com/ About Java - Update every Week.
Guide SCJP - tips that you need know http://blog.camilolopes.com.br/livrosrevistaspalestras/
Be Humble... Be Nice.
Originally posted by Campbell Ritchie:
You can try using base 36 arithmetic, which allows you to parse any letter, a=10, z=35. It might work with H as well; I have never tried. But you can't use base 37 arithmetic!
Integer.parseInt("hello", 36);
Might work, might not.
Java hobbyist.
Don't get me started about those stupid light bulbs. |