Category: Java

java tutorials

How to Calculate Folder Size in Java

Calculating the size of a folder or directory is trivial. In Java you can recursively traverse each folder and calculate the size of each file individually, and return the sum of all the files. You’ll...
java tutorials

Converting a String into a Date in Java

This tutorial shows how to convert a java.lang.String into a java.util.Date. We can convert a String into a Date using the parse() method of the DateFormat and SimpleDateFormat classes. // from java.lang.String into java.util.Date String...
java tutorials

Getting Current Date and Time in Java

This tutorial shows how to get the current date and time in Java. The standard Java classes we can use are java.util.Date, java.util.Calendar and the new java 8 java.time.LocalDateTime and java.time.ZonedDateTime. You could also use...
tomcat tutorials

Monitor Tomcat with JMX and jConsole

This tutorial shows how to monitor Tomcat with JMX via jConsole. Monitoring is a key aspect for developers or system administrators. Looking inside a running server, obtaining some statistics like: Heap / Non-heap memory utilization,...
simple java qr code generator example

Simple Java QR Code Generator Example

Quick Response Codes (QR Codes) are becoming one of the most popular barcode systems in the world, thanks to smartphones. Their usage is really versatile, from automotive, product packaging to online ticket services. Business started...