Diaspark interview question

Two Programs of java for database connectivity