It makes a difference in terms of the byte code generated but no difference in terms of performance.
What is far more important is making the code as simple, self contained and maintainable as possible. For this reason I would prefer the first example.
BTW: Simpler code is often optimised better because its easier for the JIT to optimise as much as it can. Confusing code will also confuse the JIT and it will prevent optimisations being used.
If you use ASMifierClassVisitor which dumps the raw byte code in a readable form (and can be turned back into the original byte code) You will see that javap
glosses over some of the details which are not so important.
If I compare (on the left below) at 951 bytes long.
List<Item> items = new ArrayList<Item>();
Foo foo;
int bar;
for (Item item : items) {
foo = item.getFoo();
bar= item.getBar();
// do something with foo and bar
}
with (on the right below) and 935 bytes long.
List<Item> items = new ArrayList<Item>();
for (Item item : items) {
Foo foo = item.getFoo();
int bar = item.getBar();
// do something with foo and bar
}
You can see at the very least the debug line numbers must be different, but also some of the code is different as well as the local variables defined in a different order and given different allocation numbers.

You can right click
=> View Image
to see the image better.