public static boolean check ( int n ) {
  boolean arr [ ] = new boolean [ 10 ] ;
  for ( int i = 0 ;
  i < 10 ;
  i ++ ) {
    arr [ i ] = false ;
  }
  while ( n > 0 ) {
    int digit = n % 10 ;
    if ( arr [ digit ] ) {
      return false ;
    }
    arr [ digit ] = true ;
    n = n / 10 ;
  }
  return true ;
}

public static boolean check ( int n ) { boolean arr [ ] = new boolean [ 10 ] ; for ( int i = 0 ; i < 10 ; i ++ ) { arr [ i ] = false ; } while ( n > 0 ) { int digit = n % 10 ; if ( arr [ digit ] ) { return false ; } arr [ digit ] = true ; n = n / 10 ; } return true ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (boolean_type) dimensions: (dimensions_expr (decimal_integer_literal))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (false))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (array_access array: (identifier) index: (identifier))) consequence: (block (return_statement (false)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (true))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (return_statement (true))))