Why would an '87 300zx engine start up and then die right away?

my 87 just had this problem...it was the mass air flow sensor. if its not that try the computer my 86 had the same problem, it was the Mass Air Flow Sensor