HC-SR04 Ultrasonic Programming in Eclipse Java

Our team recently got the HC-SR04 ultrasonic sensor that goes into three DIO ports into the RoboRIO. Here’s the code we ran:

package org.usfirst.frc.team5667.robot;
import edu.wpi.first.wpilibj.Ultrasonic;
public class UltrasonicSensor {
Ultrasonic sensor;
public UltrasonicSensor() {
sensor = new Ultrasonic(0, 1);
}
public void testReadings() {
System.out.println(sensor.isEnabled());
System.out.println(sensor.getRangeInches());
}
}

The problem is sensor always returns true, even if we set it to DIOs that have no connections. The range always returns 0. Is it a code issue or should we be connecting it differently?

Update on this, the isRangeValid() method returns false