title: how to check all character in a string is lowercase using java
body: <p>I tried like this but it outputs false,Please help me</p>
  
  <pre><code>String inputString1 = "dfgh";// but not dFgH
  String regex = "[a-z]";
  boolean result;
  
  Pattern pattern1 = Pattern.compile(regex);
  Matcher matcher1 = pattern1.matcher(inputString1);
  result = matcher1.matches();
  System.out.println(result);
  </code></pre>