In this post, we feature a comprehensive article on Java .class File. Have you ever wondered: What is bytecode in Java? What makes Java a platform-independent language? What is the Java .class file?Structure of Java class file. In this article, we will address all the above questions and we will deep dive into understanding bytecode or .class file in Java ...
Read More »Grails Spring Security Tutorial
There are many security features in Spring Security such as authentication, authorization, instance-based control, and others. Grails developers use Spring security to secure the application. Table Of Contents 1. Overview 2. Grails Spring Security 2.1. Prerequisites 2.2. Download 2.3. Setup 2.4. Running Gradle 2.5. Running Grails 2.6. HelloWorld in Grails 2.7. Testing Grails Application 2.8. Grails IDE Integration 2.9. Building ...
Read More »Java Synchronized Blocks Example
In this post, we feature a comprehensive article on Java Synchronized Blocks. Java synchronized keyword marks a block or method a critical section. A critical section is where one and only one thread is executing at a time, and the thread holds the lock for the synchronized section. Java is multi-threaded language where multiple threads runs parallel to complete their ...
Read More »Java System.in System.out System.error Example
1. Introduction In this post, we feature a comprehensive article on Java System.in System.out System.error. Java has provided java.lang.System class since version 1.0. The System class contains a static System.in for the standard keyboard input, static System.out for the system console output, and static System.err for error output streams to the system console. Here are the definitions: static InputStream in - ...
Read More »Java 8 Functional Interfaces Introduction Example
Hello readers! In this tutorial, we will learn the amazing feature of Java 8 Functional Interfaces. 1. Introduction To achieve the benefits of functional programming in Java, JDK developers introduced Functional Interfaces/Single Abstract Method (SAM) Interfaces in Java 8 programming. A functional interface is an interface that has only one abstract method A functional interface can have multiple default and ...
Read More »Java Thread sleep Example
In this article we are going to get an in depth understanding of: What is a thread in java?What is the use of sleep() in java thread based execution?Important points to remember while using Thread.sleep().How Thread.sleep() works. 1. What is a thread in Java Lets start with what the thread exactly is and how it is supported in Java. Thread ...
Read More »JAX-WS Hibernate Example
In this example, we feature a comprehensive article on JAX-WS Hibernate. We will demonstrate how to create a SOAP-based web service that uses Hibernate to read data from a database. 1. Introduction Java API for XML Web Services (JAX-WS) is a technology for developing SOAP-based web services and clients. The API includes annotations for defining web service endpoints, service implementation beans, ...
Read More »Java String vs StringBuffer vs StringBuilder Example
1. Introduction In this post, we feature a comprehensive article on Java String vs StringBuffer vs StringBuilder. In an in-depth analysis we will feature how to create Strings and modify string objects using String class, StringBuffer class and StringBuilder class. 2. Java String vs StringBuffer vs StringBuilder 2.1 Prerequisites Java 7 or 8 is required on the linux, windows or ...
Read More »Printf Java Example (with video)
In this post, we feature a comprehensive article about the printf Java method. We will see some examples using the System.out.printf method and examples where the printf method can format a string which contains formatting specifiers. 1. Introduction The Java PrintStream class has provided the printf method to write a formatted string to the PrintStream object since version 5. Here ...
Read More »Java 8 Lambda Expressions Introduction Example
Hello readers! In this tutorial, we feature a comprehensive article on Java 8 Lambda Expressions. 1. Introduction To achieve the benefits of functional programming in Java, JDK developers introduced Lambda Expressions in Java 8 programming. A lambda expression is a nameless function which does not have the name, return type, and access modifiers A lambda expression instance can be assigned ...
Read More »