java's way of determining whether a string has a comma

  • 2020-05-19 04:49:18
  • OfStack

As follows:


if(str.indexOf(",") >= 0)
  System.out.println(" There is a comma in the string "); 

Related articles: