Serial problem

What i asked about why at the first program the interrupt (Nick said) doesnt work, and at the second program it works.

There are no interrupts in either program, so your question doesn't make sense.

Serial data is received using interrupts, but the interrupt service routine is not code you need to provide. All that the serial interrupt routine does is get a byte and put it in a buffer. It is your responsibility to get that data from the buffer before the buffer gets full, without abusing the poor Arduino with Strings.