static String OctToBin ( String octnum ) {
  long i = 0 ;
  String binary = "" ;
  while ( i < octnum . length ( ) ) {
    char c = octnum . charAt ( ( int ) i ) ;
    switch ( c ) {
      case '0' : binary += "000" ;
      break ;
      case '1' : binary += "001" ;
      break ;
      case '2' : binary += "010" ;
      break ;
      case '3' : binary += "011" ;
      break ;
      case '4' : binary += "100" ;
      break ;
      case '5' : binary += "101" ;
      break ;
      case '6' : binary += "110" ;
      break ;
      case '7' : binary += "111" ;
      break ;
      default : System . out . println ( "\nInvalid Octal Digit " + octnum . charAt ( ( int ) i ) ) ;
      break ;
    }
    i ++ ;
  }
  return binary ;
}

static String OctToBin ( String octnum ) { long i = 0 ; String binary = " " ; while ( i < octnum . length ( ) ) { char c = octnum . charAt ( ( int ) i ) ; switch ( c ) { case '0' : binary += "000" ; break ; case '1' : binary += "001" ; break ; case '2' : binary += "010" ; break ; case '3' : binary += "011" ; break ; case '4' : binary += "100" ; break ; case '5' : binary += "101" ; break ; case '6' : binary += "110" ; break ; case '7' : binary += "111" ; break ; default : System . out . println ( " \n Invalid ▁ Octal ▁ Digit ▁ " + octnum . charAt ( ( int ) i ) ) ; break ; } i ++ ; } return binary ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (cast_expression type: (integral_type) value: (identifier)))))) (switch_expression condition: (parenthesized_expression (identifier)) body: (switch_block (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (string_literal))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (string_literal))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (string_literal))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (string_literal))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (string_literal))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (string_literal))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (string_literal))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (string_literal))) (break_statement)) (switch_block_statement_group (switch_label) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (cast_expression type: (integral_type) value: (identifier)))))))) (break_statement)))) (expression_statement (update_expression (identifier))))) (return_statement (identifier))))