'How to import data with getGeoLocation twitter4j to MySQL using Java Netbeans

I want to execute my Twitter crawling using Java importing data to MySQL. My problem is when I set parameter for getGeoLocation, which contained latitude and longitude, then I found something error.

GeoLocation geoLocation = status.getGeoLocation();
    
    stmt = conne.prepareStatement("INSERT INTO tweet(ID,date,name,coordinate) VALUES (?,?,?,?)");

    stmt.setInt(1, (int) status.getId());
    stmt.setString(2, getTimeStamp());
    stmt.setString(3, status.getUser().getScreenName());
 if (status.getGeoLocation() != null){
    stmt.setDouble(4, status.getGeoLocation().getLongitude() && status.getGeoLocation().getLatitude());                                                                           
  }  

The output said it is hard to specify for parameter 4 (geoLocation):

enter image description here

Many thanks for any comment!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source