Skip to content

Tag: java

How to create LinkedList of JPA entities

I have a scenario where I need to create an entity which has references to list of predecessors and list of successors. when a request is received, I need to create entity like below: Request: My new entity “task2” should now be created as below in DB. While saving task2 with previous as task1 and…

Creating JDBC Application

I have this piece of code: but I have this error: Answer Since you commented out your print statement, your loop is now closing the connection (and all of its dependent resources). Your code, without the commented out line: