Every single Mario game since the very first Super Mario Bros. on NES has had the same trick that can be used to achieve a literally infinite number of lives if one so chooses. The method is the same in every Mario game, and works just as well in New Super Mario Bros. U as it has in all previous incarnations.
First, you need to find an area with stairs that has a shelled enemy such as a Koopa-Troopa walking down them. As it comes down the stairs, time your jump so you’ll land on him right as he’s near the edge of the next stair. This will launch him back and off the wall, and back towards you again. If the timing and distance is right, you’ll automatically jump on him again, and repeat the process of launching him against the stair wall and back towards you, all the while racking up points multipliers until you’re into 1up territory. At this point, all you need do is sit back and watch the 1up’s pile up endlessly until you’re satisfied enough to end the cycle.
The flying squirrel suit can also accomplish this feat, though it takes a lot more work, and must be manually maintained. If you wish to try that route though, find an area with many Koopa’s roaming around, and swoop around off their shells, never actually touching the ground as you glide and bounce back and forth between each Koopa, racking up 1up after 1up.