title: My goal is to get the value of cType and cSize from the two methods but it keeps returning "nullnull"
body: <pre><code>public class Main
  {
      static String clotheOrder[] = {&quot;FB02&quot;, null, null, null, &quot;TS03&quot;, &quot;GS04&quot;, null, &quot;PA03&quot;};
      int clotheQuantity[] = {3, 0, 2, 0, 2, 2, 0, 0};
      static String cType, cSize;
  
  ```
      public static void main(String[] args) {
          for (int x = 0; x &lt;= clotheOrder.length; x++) {
              
              if (clotheOrder[x] == null) {
                  
                  System.out.println(&quot;No order&quot;);
                  continue;
              }
              else {
              System.out.println(clotheType(clotheOrder[x].replaceAll(&quot;[^0-9]&quot;, &quot;&quot;)) 
                                 + clotheSize(clotheOrder[x].replaceAll(&quot;[^A-Z]&quot;, &quot;&quot;)));
              }
          }
      }
      static String clotheType(String type) {
              
                   if (type == &quot;FB&quot; ) {cType = &quot;Blouse .............&quot;;}
              else if (type == &quot;TS&quot; ) {cType = &quot;T-Shirt ............&quot;;}
              else if (type == &quot;GS&quot; ) {cType = &quot;Garterized Shorts ..&quot;;}
              else if (type == &quot;PA&quot; ) {cType = &quot;Pants ..............&quot;;}
              else if (type == &quot;PS&quot; ) {cType = &quot;Pencil Skirt .......&quot;;}
              else if (type == &quot;CC&quot; ) {cType = &quot;Chinese Collar Polo &quot;;}
              else if (type == &quot;PW&quot; ) {cType = &quot;White Slacks .......&quot;;}
              else if (type == &quot;RB&quot; ) {cType = &quot;Round Neck Blouse ..&quot;;}
              else if (type == &quot;S&quot;  ) {cType = &quot;Skirt ..............&quot;;}
              else if (type == &quot;VN&quot; ) {cType = &quot;V-Neck Polo ........&quot;;}
                   
              return cType;
      }
      
      static String clotheSize(String size) {
          
                   if (size == &quot;01&quot;) {cSize = &quot; (Extra-Small) ...&quot;;}
              else if (size == &quot;02&quot;) {cSize = &quot; (Small) .........&quot;;}
              else if (size == &quot;03&quot;) {cSize = &quot; (Medium) ........&quot;;}
              else if (size == &quot;04&quot;) {cSize = &quot; (Large) .........&quot;;}
              else if (size == &quot;05&quot;) {cSize = &quot; (X-Large) .......&quot;;}
              else if (size == &quot;06&quot;) {cSize = &quot; (2X-Large) ......&quot;;}
              else if (size == &quot;07&quot;) {cSize = &quot; (3X-Large) ......&quot;;}
              else if (size == &quot;08&quot;) {cSize = &quot; (Add-ons) .......&quot;;}
                  
              return cSize;
      }
  }
  ```
  </code></pre>
  <p><a href="https://i.stack.imgur.com/OI04n.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>Is there any other way to get the return values from these two methods?
  Thanks in advance :)</p>