How can I set the max length of a string, in other languages you can define it when you declare a variable but how do I do it in java?