Connect your camera then, run your setup() with the following, and change the index of the devices array to the one you want...
void setup() {
size(640, 480);
String[] devices = Capture.list();
println(devices);
// Change devices[0] to the proper index for your camera
cam = new Capture(this, width, height, devices[0]);
}