title: Related to making if and else logic simple
body: <p>Can someone help me or guide me with resources that would help me write this code in a simple way? We are internally storing some values which have a different representation across the company. I was wondering if there is a way in JAVA where I store this value ahead of time with its actual standard values which everyone knows.</p>
  
  <p>For instance,</p>
  
  <p>{</p>
  
  <p>ab -> apple</p>
  
  <p>bc -> ball</p>
  
  <p>cd -> cat</p>
  
  <p>}</p>
  
  <p>In my code, I retrieve ab from the database. Instead of checking each time what ab represent, I can on the fly pass the standard value to some other service.</p>
  
  <p>I'm looking to implement something pass apple instead of ab without the use of if and else statement. I know that I will have to store the standard value and point to the internal value which would be a one time thing of writing. </p>
  
  <p>Something in the direction of an array </p>
  
  <p>instead at index[0] -> 1
  I say index[ab] -> apple</p>
  
  <p>So something like: let's say I retrieved a from the database, in the code, I just simply call a convert.(a) which return apple instead..</p>
  
  <p>I can't think of a way ... need some help</p>