public static void main ( String [ ] args ) {
  int N = 5 ;
  Stack < Integer > s = new Stack < > ( ) ;
  s . add ( 1 ) ;
  s . add ( 2 ) ;
  s . add ( 3 ) ;
  s . add ( 4 ) ;
  s . add ( 6 ) ;
  int [ ] a = {
    6 , 3 , 4 , 1 , 2 };
    countEle ( s , a , N ) ;
  }
  
public static void main ( String [ ] args ) { int N = 5 ; Stack < Integer > s = new Stack < > ( ) ; s . add ( 1 ) ; s . add ( 2 ) ; s . add ( 3 ) ; s . add ( 4 ) ; s . add ( 6 ) ; int [ ] a = { 6 , 3 , 4 , 1 , 2 } ; countEle ( s , a , N ) ; }
(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: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) 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)))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_initializer (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))))