Home » Tag Archives: java basics

Tag Archives: java basics

Java Math.pow Example

In this article, we examine the Java Math.pow method and we provide some examples of its use. 1. Introduction The java.lang package provides classes and interfaces that are central to the Java programming language. The Math class from the java.lang package contains static methods for performing many common math operations. These include exponential, logarithm, square root, and trigonometric functions. One ...

Read More »

Java Singleton Design Pattern – Best Practices with Examples

In this post, we feature a comprehensive Tutorial on Java Singleton Design Pattern. Design Patterns in Java are incredibly popular among the software developers. One of the most common interview questions is the Singleton Design Pattern. So in this tutorial, I’ll summarize the best practices which will help developers dodge general issues and develop better applications. Table Of Contents 1. ...

Read More »

Java Servlet Hidden Field Example

A hidden form field is a technique used to store the session information for a particular client and is one of an important Session Tracking Technique. In this tutorial, we will explain and show you how to handle the hidden fields in a Servlet. 1. Introduction Session Tracking is a technique to maintain the requests of the same user for a ...

Read More »

Java Servlet onclick Example

Servlets are modules of the Java code that run in a server application to answer the client requests. They are not tied to a specific client-server protocol but are most commonly used with HTTP. The word “Servlet” is often used in the meaning of “HTTP Servlet“. In this tutorial, we will explain and show you how to call a Servlet ...

Read More »

Java Servlet Life Cycle Example

Servlets are modules of the Java code that run on a server application to answer the client requests. They are not tied to a specific client-server protocol but are most commonly used with HTTP and the word “Servlet” is often used in the meaning of “HTTP Servlet“. In this tutorial, we will explain the Servlet Lifecycle. 1. Introduction Servlet is ...

Read More »

Hibernate SQL Parameter Values using Log4j Example

When using Hibernate, if developers log the Hibernate SQL statements, they will see something like this: Hibernate: insert into student (id, first_name, last_name, email) values (?, ?, ?, ?) However, for debugging the application, developers want to see the actual parameter values in the Hibernate logs i.e. basically, they want to get rid of the question marks in the logs. ...

Read More »

Java Nio Delete File Example

If developers are working on a Java Swing or a desktop application then it may be required that sometimes developers need to delete a file from the file system. This tutorial is to learn about handling the files using the Java Nio package and shows how to delete a file in Java using the Nio package.         ...

Read More »

Lombok Utility and Scrapbook an eclipse feature

Today we are going to see couple of utility features which could ease coding and help you save some time. They have handy features and I would recommend to have a look and try it. Let’s start a utility called Lombok which is an open source and helps to make code clean and reduce the boiler plate code. It’s very easy ...

Read More »

IntelliJ GUI Designer Example

This example demonstrates how you can utilize IntelliJ GUI Designer to create a graphical user interface that is based on the Swing library components. It must be noted that IntelliJ does not support modeling of non-swing components. When working with the GUI Designer you operate in design view where you are able to drag and drop swing components within the ...

Read More »

IntelliJ IDEA Tutorial for Beginners

This example demonstrates how you can get started with IntelliJ IDEA for the first time. Intellij IDEA is a JetBrains IDE product that supports multiple languages and frameworks (e.g. Java, Scala, Groovy) and works cross platforms i.e Windows, OS X, and Linux. Intellij IDEA comes in two editions: Community Edition – Free and open source Ultimate Edition – Commercial A ...

Read More »