Golding specifically stated the story was an allegory for power and government and kept the class and status of the boys vague. So no, the children in it aren’t specifically public school (for confused American readers, that is private school). You might be thinking of the 90s movie adaptation which specified the boys…