I am following the tutorial from the book "Android Programming Tutorials, 3rd Edition".
In lesson number 3 "A Fancier Form" I experience some problems within Eclipse.
The author says to add the following line of code:
public String getType(){ return(type); } public void setType(String type) { this.type=type;
Which results in having the following code:
package apt.tutorial;
public class Restaurant {
private String name="";
private String address="";
public String getName() { return(name); }
public void setName(String name) { this.name=name; }
public String getAddress() { return(address); }
public void setAddress(String address) { this.address=address; }
public String getType(){ return(type); }
public void setType(String type) { this.type=type; }
}
eclipse gives me the following errors: For the first "Type" I get type cannot be resolved to a variable. For the second "Type" I get type cannot be resolved or is not a field.
I hope someone can explain me which steps to take to fix this.
Thanks in advance