Cocky
So Iceman isn't cocky.
He is completely cocky. He isn't confident he is cocky he doesnt look after just himself he worries about others and likes to tell them where they are wrong. Is isn't the Alpha dog, but he wants to be, he tries to be.
In the end Iceman only won becasue Goose got killed. Plus had the Flat Spin happened to Iceman he would have never recovered he would have been done, because he wouldn't have been able to rationalize something random.
Maverick knew it was an accident, and deep down knew that he couldn't have done anything, he was most affected by the fact that his best friend was dead while he was flying. He needed Goose's dog tags to get him back in the game. It was the loss of Goose not the loss of his confidence that was dogging him.
Iceman was good possibly very good, but he could never be great. He just didn't have the intangibles. He knew this, and this is why he was threatened by Maverick.
Secondly as a character he was manufactured to be the anti Maverick he didn't have his own personality, his personality was everthing that Maverick wasn't. Kind of like not having a real identity. Kind of the wodden cut out hollywood style. But if we get past this part and pretend that the movie is real, Iceman is a good example of a typical real life type.
Iceman was also a fraud. He was called IceMan becasue he was so calm and cool and in control, but he couldn't even contain himself around Maverick. He had to engage Maverick and call him Dangerous, in effect attacking Maverick first. Not the move of a true IceMan. Reiterated by Maverick's comment "Thats right Ice.... Man I am dangerous". Maverick knew he had gotten to Iceman, that he had the upper hand.
He was actually threatened by Maverick, becasue Maverick had the raw skill and talent that he had to work so hard for. It was work for Iceman, and fun for Maverick. Maverick was the confident one (although he had a chip on his shoulder related to family baggage). Maverick indicated this when he said something about "having fun" while they were at Top Gun. He wasn't threatened he wasn't insecure he was there for the experience, knowing he would do well. he always did.
IceMan had to try to re assert is fake dominance at the end by trying to put Maverick in his place "You can be my Wingman anytime".
Maverick is the one who had to overcome all the adversity. Iceman was a typical silver platter front runner. Good but not great. And he knew it. So the attitude was a front. An artificial cockiness to over come the inecurities.