I have a table book that has a column of type "Date" and in my java code I have a field of type "localdate". I need to save the data from the "LocalDate" field in the table however I am finding it difficult to do this, any suggestions?
Java:
package servico;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import model.Livro;
public class LivroService {
private List<Livro> listaLivros;
SimpleDateFormat sdt = new SimpleDateFormat("dd-MM-yyyy");
public LivroService() {
listaLivros = new ArrayList<>();
listaLivros.add(new Livro(1,123456,"Harry Potter","J.K Rowling","HP",sdt.format("12-10-2015")));
}
}