Exception Handling is one of the most important feature which all the Java developers should know. In this article we will learn What is an exception Types of Java Exceptions, Exception Hierarchy 5 Essential keywords in Java Exception Handling How to handle exceptions in Java with examples. … [Read more...]
Java URL Class Example | Create, Read and Parse URL
Java URL Class represents the URL [Uniform Resource Locator], through which you can locate and retrieve data from the network. The URL Class in Java enables us to get the data without the need to worry about the way to communicate with the server, or the protocol which needs to be used during the communication or the format of the message which will be returned. … [Read more...]
35 Star Pattern Programs In Java | Pattern Program
In this article, we will learn to print the different Star Pattern Programs in Java. This is one of the popular Java pattern program interview question for fresher. The pattern program are the most recommended programs to enhance the logical thinking and for the better understanding of flow control. Lets look into the below possible Star Pattern Programs in Java which might … [Read more...]
Java RSA Encryption and Decryption Example | ECB Mode + 4096 Bits + OAEPWITHSHA-512ANDMGF1PADDING
RSA [Rivest Shamir Adleman] is a strong encryption and decryption algorithm which uses public key cryptography. RSA algorithm is an Asymmetric Cryptography algorithm, unlike Symmetric algorithm which uses the same key for both Encryption and Decryption we will be using two different keys. One key can be given to anyone [Public Key] and the other key should be kept private … [Read more...]
Spring Interceptor Example | HandlerInterceptor | HandlerInterceptorAdapter
Spring Interceptor is similar to a Filter, which is used to intercept the request and process them. Spring MVC allows you to intercept web requests for pre-handling and post-handling through Handler Interceptors. All the Interceptor class must either implement the HandlerInterceptor interface or extend the HandlerInterceptorAdapter class. Spring … [Read more...]
Factorial Program in Java [While Loop | For Loop | Do While Loop | Recursion]
The factorial of n numbers can be denoted as n!, it is the product of all number less than or equal to n n! = 1 * 2 * 3* . . . . (n-2) * (n-1) * n In this article, we will create the Factorial Program in Java using the below 4 ways Using For loop Using While loop Using Do While loop Using Recursion … [Read more...]
Java URL Encode and Decode Example | URLEncoder & URLDecoder
It is always a good practice to encode the URL or the Form parameters as it is vulnerable to attack. URLEncoder is the utility class provided by Java which can be used for HTML form encoding. The URLEncoder class converts any String into application/x-www-form-urlencoded. In this article we will learn about Java URL encode and decode using URLEncoder and URLDecoder. … [Read more...]
Spring Boot Exception Handling – @RestControllerAdvice + @ExceptionHandler
A good REST API should handle the exception properly and send the proper response to the user. The user should not be rendered with any unhandled exception. In this Spring Boot Exception Handling article, we will learn how to handle in exception in Spring Boot RESTful Web Services using @RestControllerAdvice and @ExceptionHandler … [Read more...]
Spring Security Custom Login Form Example | Java Configuration
In this Spring Security Custom Login Form Example, we will learn how to build a Spring MVC application which will be protected by Spring Security. We will be building our own login form rather than using the default form provided by Spring Security … [Read more...]
Spring Boot Security Database Authentication Example
In this Spring Boot Security Database Authentication Example, we will learn how to secure REST API using Spring Boot Database Authentication. All the user who tries to access the secured resource will be authenticated and authorized using the Database Authentication. … [Read more...]
Spring Boot Security Basic Authentication – Secure REST API
In this post, we will learn how to secure REST API using Spring Boot Security Basic Authentication. With the security in place our application will be providing the data to the user who is authenticated through Basic Authentication. In order to access a secured resource the user has to provide the request to our API with the header information containing the username and … [Read more...]
Spring Security REST Basic Authentication
In this article, let's learn how to enable Spring Security REST Basic Authentication. We will be setting up the Spring Security using XML configuration. We will be building the Employee Management system where in which you will be able to Create an Employee, Get all the Employee / particular Employee details, Modify an existing Employee and Delete the Employee. … [Read more...]
- « Previous Page
- 1
- 2
- 3
- 4
- 5
- …
- 29
- Next Page »