[adjective] + 哉!
[adjective] + 哉,[noun]!
何 / 岂 / 安 + [verb phrase] + 哉?
哉 ends a classical sentence that exclaims. The commonest frame is a single adjective + 哉: 善哉 "excellent!", 快哉 "how delightful!", 壮哉 "how magnificent!". Modern writers reach for it when they want an exclamation to sound grand or tongue-in-cheek.
Classical exclamations often put the adjective + 哉 before the subject, the reverse of normal order.
With 何, 岂 or 安 before the verb, 哉 closes a question that expects no answer.
优哉游哉 is "carefree and leisurely". 呜呼哀哉 was a funeral lament and is now a joke for "done for".