Here is one way to solve:
There are a total of 6! different combinations if you don't care where June sits. That is 6 x 5 x 4 x 3 x 2 x 1 = 720.
Now place June on the left. That leaves five students and five seats. There are 5! different combinations, or 5 x 4 x 3 x 2 x 1 = 120
Now place June on the right. There are 120 different combinations of the remaining 5 students and 5 seats.
Subtract 720 - 120 - 120 = 480.
The answer is 480 combinations where June is not on either side.