2001 Maxima--hard to start.... sometimes!

You said you hear nothing but a humming sound, which is probably the fuel pump. You don’t hear the starter turning the engine over? If not, you may have a bad neutral safety switch in the transmission shifter. Next time you turn the key and the engine doesn’t crank, try moving the shift lever out of Park, then back into Park, then try to start the engine. If it does now turn over, the neutral safety switch is probably going bad.

If the engine does crank but won’t start, it may be a bad fuel pump. In that case, try waiting several seconds after turning the key to “run” position (where you hear the fuel pump hum) before turning to “start” position. Letting the fuel pump run several seconds helps build fuel pressure before trying to start. If that helps, you may need a new fuel pump.