public static int logicOfSequence ( int N ) {
  if ( N % 2 == 0 ) N = N * N ;
  else N = N * N * N ;
  return N ;
}

public static int logicOfSequence ( int N ) { if ( N % 2 == 0 ) N = N * N ; else N = N * N * N ; return N ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) alternative: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))))) (return_statement (identifier))))