public static void main ( String args [ ] ) {
  queue = new LinkedList < Integer > ( ) ;
  queue . add ( 10 ) ;
  queue . add ( 20 ) ;
  queue . add ( 30 ) ;
  queue . add ( 40 ) ;
  queue . add ( 50 ) ;
  queue . add ( 60 ) ;
  queue . add ( 70 ) ;
  queue . add ( 80 ) ;
  queue . add ( 90 ) ;
  queue . add ( 100 ) ;
  int k = 5 ;
  reverseQueueFirstKElements ( k ) ;
  Print ( ) ;
}

public static void main ( String args [ ] ) { queue = new LinkedList < Integer > ( ) ; queue . add ( 10 ) ; queue . add ( 20 ) ; queue . add ( 30 ) ; queue . add ( 40 ) ; queue . add ( 50 ) ; queue . add ( 60 ) ; queue . add ( 70 ) ; queue . add ( 80 ) ; queue . add ( 90 ) ; queue . add ( 100 ) ; int k = 5 ; reverseQueueFirstKElements ( k ) ; Print ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) body: (block (expression_statement (assignment_expression left: (identifier) right: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list)))))