how to get string length of varaible in parameters in java code example Example: length of string in java str.length();