Java naming conventions recommend using camel case for method, class, and variable names. So the suggestion would be to use this signature:
public ArrayList getClinicDoctorList(int clinicId) throws SQLException;
That being said, using clinic_id
is in fact legal Java, and the code would compile and run. There are occasions where using underscore in names is required, such as interfacing with a framework which expects this naming convention. One example would be a Java POJO which you intend to serialize out to JSON. In this case, if you wanted JSON keys to be separated by underscore, rather than using camel base, you might also use underscores in the POJO. But in general, the universal convention is to use camel case.