Update SpiralMatrix.java

Submission Result: Runtime Error

Last executed input:	[[6,9,7]]

Submission Result: Wrong Answer

Input:	[[2,3]]
Output:	[]
Expected:	[2,3]

Submission Result: Wrong Answer

Input:	[[2,3]]
Output:	[2]
Expected:	[2,3]

Submission Result: Wrong Answer

Input:	[[1,2,3,4],[5,6,7,8],[9,10,11,12]]
Output:	[1,2,3,4,8,12,11,10,9,5]
Expected:	[1,2,3,4,8,12,11,10,9,5,6,7]