private static boolean isTruncatablePrime ( int n ) {
  for ( long i = 10 ;
  i <= n ;
  i *= 10 ) {
    if ( ! Library . isPrime ( n % ( int ) i ) ) return false ;
  }
  for ( ;
  n != 0 ;
  n /= 10 ) {
    if ( ! Library . isPrime ( n ) ) return false ;
  }
  return true ;
}

private static boolean isTruncatablePrime ( int n ) { for ( long i = 10 ; i <= n ; i *= 10 ) { if ( ! Library . isPrime ( n % ( int ) i ) ) return false ; } for ( ; n != 0 ; n /= 10 ) { if ( ! Library . isPrime ( n ) ) return false ; } return true ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (assignment_expression left: (identifier) right: (decimal_integer_literal)) body: (block (if_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (cast_expression type: (integral_type) value: (identifier))))))) consequence: (return_statement (false))))) (for_statement condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (assignment_expression left: (identifier) right: (decimal_integer_literal)) body: (block (if_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) consequence: (return_statement (false))))) (return_statement (true))))