[问卦] 用if else叙述反对死刑但这个必须死

楼主: aiweisen (艾维森)   2022-08-23 15:52:14
需求不难 但这应该是要用例外处理才对。
原本想说是不是只有警察适用,但想了一下,
被杀害的对象如果是一般老百姓,才会被说放下仇恨吧?
所以只要今天被杀死的对象是老百姓以外的,应该都要被砰砰
private val isOpposedOfTheDeathPenalty = true
fun doBestOfFaith() {
try {
while (isOpposedOfTheDeathPenalty) {
onIDCheck(person)
}
} catch (e: InterruptedException) {
print("Fuck you , Bang!!Bang!!")
}
}
@Throws(InterruptedException::class)
private fun onIDCheck(person: Person) {
if (person != Commoner) {
throw InterruptedException()
}
}

Links booklink

Contact Us: admin [ a t ] ucptt.com