[Solved] Are the math operators +,-,*,/ strings, floats or integers?(Java)


I can already get the integers but I am having trouble with the
operators since I don’t know what category they fall in

They belongs to none of these. They are part of programming language and not data type. Data types and operators work along to perform some action like

int a, b;
int c = a + b;

Even you can have that operator as a String but after user input you have to perform check to decide about the operation.

if("+".equals(userInput) {// "+" is String
  int c = a + b;
}

As mentioned by TheLostMind in comment, for checking the user input you should use switch case.

4

solved Are the math operators +,-,*,/ strings, floats or integers?(Java)