When you instantiate an automatic object (e.g., on the stack) using its default constructor, mind that the correct syntax is:
String str; //correct
And not this:
String str(); //entirely different meaning
Can you see why? The second statement is parsed as a declaration: