It depends on the rules for assigning oxidation numbers.
My rule for Hydrogen is :
# Hydrogen has an oxidation state of +1 except when bonded to more electropositive elements such as sodium, aluminium, and boron, as in NaH, NaBH4, LiAlH4, where each H has an oxidation state of -1.\
So here, N2H4 means nitrogen is the more electropositive, so H is -1, leaving N to be +2
N is +2
oxidation state of nitrogen in n2h4
2 answers
In this compound N2H4 the oxidation number on each atom of nitrogen is -2 and oxidation number on each hydrogen atom is +1 so the over all on nitrogen atoms has -4 and on hydrogen atoms is +4 so overall compound is neutral .