I have received the following error message
G:\CIS260\Assignments>javac PhoneNumber.java
PhoneNumber.java:45: error: incompatible types
number = decode(c);
^
required: int
found: String
1 error
in the beginning of the class i have
char c;
private int number = 0
This makes it an int so i understand that in order for the next line to compile i have to have two of the same data types. My understanding is that
str[1].valueOf(number);
number = decode(c);
public static String decode(char c){
switch (c) {
should make the variable NUMBER a string making decode and number equal data types because they are both strings.
I feel like i may be forgetting a step in order to make both strings data types. any thoughts?