How to insert a record using JDBC PreparedStatement

  • 05 April 2016
  • ADM

How to insert a new record using JDBC PreparedStatement in Java to avoid SQL injection. Example with auto-increment table.


How to create thread pool in Java

  • 05 April 2016
  • ADM

How to create a simple thread pool in Java using ExecutorService, Executors, ThreadPoolExecutor and RejectedExecutionHandler classes.


JDBC Statement vs PreparedStatement

  • 05 April 2016
  • ADM

JDBC Statement vs PreparedStatement with example. Comparison between around SQL Injection using SELECT query.


How to create Builder design pattern in Java

  • 03 November 2016
  • ADM

How to create Builder Design Pattern in Java using simple example and comparison with classic instantiation.


How to get free disk space in Java

  • 05 April 2016
  • ADM

How to get free disk space in Java using File.getFreeSpace(), File.getTotalSpace() and File.getUsableSpace().


How to convert byte size into human readable format in java

  • 20 May 2016
  • ADM

How to convert byte sizes into human readable format using Java. Convert from Kilobyte to Yottabyte.