Why on earth would you even for a moment think you’re allowed to do that?
Because OP actually lives in that building and the rest comes down to proving his intent which is extremely difficult in every situation. You’re “allowed” to do it because proving that someone literally walking to their home has intent to menace is so difficult that no authorities will even try to prosecute.
JVM is like a gas. It expands to fit it’s container, however large that is.