title: Hierarchical enum in Java
body: <p>Let's say I have a structure like this:</p>
  
  <p><a href="https://i.stack.imgur.com/eR7C7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eR7C7.png" alt="enter image description here"></a></p>
  
  <p>Is it possible to create an enum that will return the string value of selected cell? For example: </p>
  
  <pre><code>enum.GROUP_MAIN1.SUBGROUP1.COL1
  </code></pre>
  
  <p>will return value <strong>"COL1"</strong>.</p>
  
  <p>I was looking for nested enums but didn't find the solution to this situation.</p>