fork(41) download
  1. class Ideone {
  2. public static void main (String[] args) {
  3. System.out.println(digit(98765, 2));
  4. }
  5.  
  6. static int digit(int a, int b) {
  7. return a / (int)Math.pow(10, b - 1) % 10;
  8. }
  9. }
Success #stdin #stdout 0.06s 32504KB
stdin
Standard input is empty
stdout
6