Question: how would i change the name of a object using user input.
for ex. i am asking the user to input their id as a string.
i want to then use that to create a constructor.

ex.:

```
RefUnsortedList<Patients> NewList = new RefUnsortedList<Patients>();
Patients entry1=null;
System.out.println("Please enter patient's ID: ");
            String TargetID = scan.next();

```

I want to set 

```
Patients entry1 = null;

```

to make it 

```
Patients "the user input here" = null;

```

Answer: 
There are no dynamic variables in java, they have to be declared in the source code.

You could try using a Map and assigning each instance of a variable a key.

```
Map patientMap = new HashMap();
patientMap.put("entry1", new Patients());
patientMap.put("the user input here", new Patients());

```

Then when you want to retrieve the patient you can use:

```
Patients patient = patientMap.get("the user input here");

```
I am assuming you are doing something like this:

Your Patient Class:

```
public class Patient {
    private String patientID;

    public Patient(String patientID) {
        this.patientID = patientID;
    }

    public String getPatientID() {
        return patientID;
    }

    public void setPatientID(String patientID) {
        this.patientID = patientID;
    }
}

```

...and your class that you are using for running the console:

```
public class Main {

    public Main() {
    }

    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        System.out.println("System is ready to accept input, please enter ID : ");
        String ID = console.nextLine();
        Patient patient = new Patient(ID);
        //do some fancy stuff with your patient
    }

}

```

This would be a very basic example. 

As you are learning to code, be sure to really think about how to name your classes. Calling your class "Patients" would make me expect you are holding a collection of "Patients" inside each instance of this java class, rather than a single "Patient" per instance. 

Regarding the latest answers including Maps, the updated "Main" class could look like this:

```
public class Main {
    static Map<String, Patient> patients = new HashMap<String, Patient>();

    public Main() {
    }

    public static void main(String[] args) {
        Scanner console = new Scanner(System.in);
        System.out.println("System is ready to accept input, please enter ID : ");
        String id = console.nextLine();
        patients.put(id, new Patient(id));
    }
}

```