java condition to check the length of a string code example
Example 1: java check for string length
String data = "Hello, World!";
int nameLength = data.length(); // 13
Example 2: length of string in java
str.length();
String data = "Hello, World!";
int nameLength = data.length(); // 13
str.length();