java time limit

I want to ask one frequent question.In many problems i saw that in java if we submit problems then it can get submitted even if time taken by it is beyond the given time limit.How is this happening??

Time taken by our code in java is more than the given time limit and it get submitted???

Plz tell me reason for that…