assign: to initialize a new variable and assign a value to it. Example: assign
x y, where x is the variable and y is the value assigned. The value could be
an integer number, or a string
Here is what I got answered with on this form
public void assign(String varType, String varName, Object value) {
if (varType.equals("int")) {
int varName = (int) value;
} else if (varType.equals("String")) {
String varName = (String) value;
}
}
here is the issue
varName is already declared in the scope.