Can you accidentally put yourself in checkmate?

Can you accidentally put yourself in checkmate? The answer is yes it is illegal to move a piece that blocks a check to ur king the piece is considered pinned to ur king until the king is moved or the threat is removed. and it is also illegal to move ur king into check.

The answer is yes it is illegal to move a piece that blocks a check to ur king the piece is considered pinned to ur king until the king is moved or the threat is removed. and it is also illegal to move ur king into check.