Relative Content

Tag Archive for javaoperator-keyword

Why Can’t Characters Be Converted to Operators at Runtime?(java)

While learning Java, I wondered if there was a way to take an operator as a character input and use it directly in calculations. I realized that without using if or switch statements, there is no way to treat the character itself as an operator. I’m curious if anyone knows the reasons behind this limitation.