This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
JetLennit
wrote ...
2013/5/20
charAt(int) for integers
JetLennit
2013/5/20
#
Does charAt(int) work with integers? If not, than is there something similar that does?
bourne
2013/5/20
#
This should work: (myInt + "").charAt(int)
danpost
2013/5/20
#
int testValue = 254; char c = (""+testValue).charAt(1); // c is set to '5'
JetLennit
2013/5/20
#
Thank you both!
You need to login to post a reply.
X