SyntaxFix
Write A Post
Hire A Developer
Questions
Your array don't have initialization. So it will give default value Zero. You can try like this also
String temp = Integer.toString(urNumber); System.out.println(temp.charAt(temp.length()-1));