You can't connect LEDs in parallel because the voltage for each one is different. Therefore the one with the lowest voltage will hog most of the current and burn out, followed quickly by the rest of the LEDs burning out.
I haven't seen an LED that measures 4.0V, and most have an absolute max current of 30mA. Most white and blue ultra-bright LEDs operate well at 20mA and have a typical voltage of about 3.5V.
A 68 ohm resistor in series with each LED will limit the current to 22mA each. Your 5V supply must provide 880mA for 40 of them.