In how many ways can 3 boys and 3 girls be seated in a row if all boys and all girls must sit side by side

There are 2 ways to seat the boys and girls with all boys and all girls sitting side by side.

1. B1 B2 B3 G1 G2 G3
2. G1 G2 G3 B1 B2 B3

So there are 2 ways to seat 3 boys and 3 girls in a row if all boys and all girls must sit side by side.