Q:

How to create class object depending on one statement

I have trouble with creating class objects. 
I have two classes, Employee and Article.  Both of them have same methods(edit(), remove(), save(), list()).  Now I want to create object "obj" from the specific class, depending on the string "item", so I can use him later like showed bellow.  
My method
    private void subMenu(String item) {

        switch(item) {
            case "employee":
                Employee obj = new Employee();
                break;
            case "article":
                Article obj = new Article();
                break;
        }
        obj.edit();
        obj.remove();
        ...
    }

I tried something like this but it just throws Exception: 
 Duplicate local variable obj

Class Article
public class Article() {

    public void edit() {

    }

    public void remove() {

    }

    public void save() {

    }

    public void list() {

    }
}

Class Employee
public class Employee() {

    public void edit() {

    }

    public void remove() {

    }

    public void save() {

    }

    public void list() {

    }
}

A:

1) Create an interface with all common methods (give it a better name than Item):
public interface Item {

    void edit();

    void remove();

    void save();

    void list();
}

2) Make both classes implement that interface:
public class Article implements Item {

    public void edit() {

    }

    public void remove() {

    }

    public void save() {

    }

    public void list() {

    }
}

3) Replace local variables with Item:
private void subMenu(String item) {
    Item obj;
    switch(item) {
        case "employee":
            obj = new Employee();
            break;
        case "article":
            obj = new Article();
            break;
       default:
            return; //FIXME Can it happen? 
    }
    obj.edit();
    obj.remove();
    ...
}

