Java TimeZone Class Example

java-thumbnail

TimeZone is an abstract class which defines as standard time followed within a geographical area for the use with the Gregorian calendar. The TimeZone class allows working with TimeZone offset based on Greenwich Mean Time (GMT) which is referred as Coordinated Universal Time. It also sets a daylight saving time. By using getDefault TimeZone, it […]

Java PriorityQueue Class Example

java-thumbnail

In the PriorityQueue, elements are ordered in accordance to their natural ordering or the order defined by the Comparator. Comparator is the factor which compares the elements for the ordering purpose. These are defined at the queue construction time which decides the ordering of elements in the queue, based on the type of constructor used. […]

Create Custom Formatter for Logger Handler

java-thumbnail

This example shows how to write a simple custom Formatter for the logging in Java. Java provides java.util.Formatter class for extending the format of the messages and that can be applied to the handlers. In our previous example, I have explained how to write the logging handlers. If you want to write the custom formatters, […]

java.util.Formatter Example

java-thumbnail

java.util.Formatter class is used for formatting the values passed to the format() method. This class become part of Java since the Java 5 release. This feature is taken from the C language to format the string, numbers, date, etc. in the simplified manner. There is set of variables and expression defined for formatting the values. […]

Java Logging Handlers Example

java-thumbnail

In our previous example I have explained how to write a simple logging configuration in your Java program. This example shows how to use the different log handlers for printing the log messages. Log handlers are the medium where the log messages has to be transfered for the future reference. In bigger applications, the handlers […]

Java Logging Example (java.util.logging.Logger)

java-thumbnail

In our application, logging is one of the important mechanism to capture the messages thrown by the applications. One of the most popular logging framework is log4j which provides the logging in your applications. However, you can implement the logging without adding any third party implementations by the JDK’s built in logging APIs. java.util.logging package […]

Java Timer Example

java-thumbnail

In Java, we have java.util.Timer class for scheduling the tasks at the frequent intervals. The steps for creating the simple job using the java.util.Timer class is: Create the task / job by extending the java.util.TimerTask. A task has to extend java.util.TimerTask and implement the run() method Create the Timer instance to manage the tasks. You […]

How To Check Disk Space Usage on Ubuntu

ubuntu-icon

This post highlights few of the simple steps to check the usage of the disk space in your Ubuntu operating system. I have explained here using the terminal window and the user interface application for the more clarity. Lets open the terminal window and type the following command. If you type the above command in […]

Spring MVC + jQuery Integration Example

spring-thumbnail

This tutorial demonstrates how to integrate Spring MVC and jQuery for developing a web application. This example uses jQuery front end for getting the data from Spring MVC controller. Also the data is used in the text box for the auto completion feature. If you have any questions, please write it in the comments section. […]

Bootstrap Tables

bootstrap-thumbnail

This tutorial explains about different types of table structures available in Bootstrap. As we know, tables are used to represent the data in the form of rows and columns. The Bootstrap framework enables us to create table by using .table class to <table> element. There are some of the table elements which we will use […]