I'm new to JAVA and I've run into the following code snippet.
My question is about the curly braces that surrounds the 2 setter calls.
I can't find anything in the coding conventions http://www.oracle.com/technetwork/java/codeconventions-150003.pdf that explains this code snippet.
Other than to scope the setter calls (but I can't understand the need for that), I can't think of any reason for the curly braces, can someone please explain the purpose of the curly braces? (sorry I didn't have any luck looking for previous questions on this)
Foobar foobar = FoobarManager.getFoobar();
{
foobar.setName("MyFoo");
foobar.setTimestamp(timestamp);
}