The answers given do a nice job of giving a straight answer, but I wanted to speak to a couple comments that were made in the meantime, by OP.
I fairly regularly interview software developers, so hopefully i can mention a bit of what happens on the other side of the table.
I just have a feeling they will not hire you because at times bin some interviews they ask you a million and questions and if you answer one wrong, then I feel the interviewer is thinking screw this guy we will not hire him. They try and find reasons to eliminate you so I feel well I already messed up I answered a question wrong might as well quit.
What the interviewer is actually thinking is "i wonder what this says about this candidate".
A question should never have exactly one correct answer - if a candidate struggles to get to the end of a question, the interviewer shifts to wondering how the candidate grapples with a problem that he hasn't already solved. Do they give up in a fluster? Do they try to suss out a reasonable way to solve it, even if they don't know the problem space? Do they re-apply old techniques (and do those techniques work)? Do they ask questions to fill in blanks that others might take for granted? etc.
Interviews are not just about what you know, they're about how you work. How you act when you can't nail a problem is extremely important to interviewers.
a interviwer might say oh you never did X or you have no experience with Y and we want someone with X, then in my mind I am like I been written out my resume will be thrown into the trash
It's possible this interview was just a bad fit, in which case this is the fault of the recruiters, who should have screened out candidates with a totally different skillset than the job requires. Remember, the company decided to spend moneyis paying people to interview you - they aren't going to do that just to shred your resume. They're invested in this as much as you are.
The interviewer is (a bit inexpertly) saying "now we're getting to the good stuff." As above, they're looking to see how you act when you're not in your comfort zone.