public static void main ( String [ ] args ) {
  String s1 = "abcd" ;
  String s2 = "cdab" ;
  int size = s2 . length ( ) ;
  if ( isAnagram ( s1 , s2 ) ) System . out . println ( CountSteps ( s1 . toCharArray ( ) , s2 . toCharArray ( ) , size ) ) ;
  else System . out . println ( - 1 ) ;
}

public static void main ( String [ ] args ) { String s1 = " abcd " ; String s2 = " cdab " ; int size = s2 . length ( ) ; if ( isAnagram ( s1 , s2 ) ) System . out . println ( CountSteps ( s1 . toCharArray ( ) , s2 . toCharArray ( ) , size ) ) ; else System . out . println ( - 1 ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier)))) consequence: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) (identifier)))))) alternative: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (unary_expression operand: (decimal_integer_literal))))))))