title: How to check if a string is composed of commas only in java?
body: <p>I have a string that it can contains commas, but not only commas.
  For example:</p>
  
  <ul>
  <li>"," is wrong</li>
  <li>"hello, my dear" is right</li>
  <li>",,,," is wrong</li>
  <li>",,hello" is right</li>
  </ul>
  
  <p>For this reason I don't think I can use regex. How could I test this situation avoiding simple comparison like this one?</p>
  
  <pre><code>myString.equals(",") || myString.equals(",,") || ....
  </code></pre>