public static boolean right ( int [ ] points ) {
  int [ ] sides = new int [ 3 ] ;
  Arrays . fill ( sides , 0 ) ;
  sides [ 0 ] = ( points [ 4 ] - points [ 2 ] ) * ( points [ 4 ] - points [ 2 ] ) + ( points [ 5 ] - points [ 3 ] ) * ( points [ 5 ] - points [ 3 ] ) ;
  sides [ 1 ] = ( points [ 4 ] - points [ 0 ] ) * ( points [ 4 ] - points [ 0 ] ) + ( points [ 5 ] - points [ 1 ] ) * ( points [ 5 ] - points [ 1 ] ) ;
  sides [ 2 ] = ( points [ 2 ] - points [ 0 ] ) * ( points [ 2 ] - points [ 0 ] ) + ( points [ 3 ] - points [ 1 ] ) * ( points [ 3 ] - points [ 1 ] ) ;
  Arrays . sort ( sides ) ;
  if ( sides [ 0 ] > 0 && sides [ 2 ] == sides [ 0 ] + sides [ 1 ] ) return true ;
  return false ;
}

public static boolean right ( int [ ] points ) { int [ ] sides = new int [ 3 ] ; Arrays . fill ( sides , 0 ) ; sides [ 0 ] = ( points [ 4 ] - points [ 2 ] ) * ( points [ 4 ] - points [ 2 ] ) + ( points [ 5 ] - points [ 3 ] ) * ( points [ 5 ] - points [ 3 ] ) ; sides [ 1 ] = ( points [ 4 ] - points [ 0 ] ) * ( points [ 4 ] - points [ 0 ] ) + ( points [ 5 ] - points [ 1 ] ) * ( points [ 5 ] - points [ 1 ] ) ; sides [ 2 ] = ( points [ 2 ] - points [ 0 ] ) * ( points [ 2 ] - points [ 0 ] ) + ( points [ 3 ] - points [ 1 ] ) * ( points [ 3 ] - points [ 1 ] ) ; Arrays . sort ( sides ) ; if ( sides [ 0 ] > 0 && sides [ 2 ] == sides [ 0 ] + sides [ 1 ] ) return true ; return false ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (decimal_integer_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal))))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal))))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal))))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal)) right: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (decimal_integer_literal)))))) consequence: (return_statement (true))) (return_statement (false))))