String str = "a string" int length = str.length( ); // length == 8 

Read more of this post