static boolean isPerfect ( int n ) {
  double b = Math . sqrt ( n ) ;
  if ( b == ( int ) b ) return true ;
  else return false ;
}

static boolean isPerfect ( int n ) { double b = Math . sqrt ( n ) ; if ( b == ( int ) b ) return true ; else return false ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (integral_type) value: (identifier)))) consequence: (return_statement (true)) alternative: (return_statement (false)))))