get the size of a string java code example
Example 1: string length in java
String data = "Hello, World!";
int nameLength = data.length();
Example 2: java length of string
string.length()
String data = "Hello, World!";
int nameLength = data.length();
string.length()