For a given 2D Array we can find the max number. Here we are going to explain the examples with java 8 and earlier versions. In the below code a two dimensional array of integers is given as input. From the given input, using for loop the maximum integer is printed in the console. FindMaxNumber.java
Java 8 Print names from a List starting with a letter
The example uses java 8 stream to filter a String value with starting letter say ‘S’. Create a stream from a list of names. In the stream use the filter method. The filter will return a Stream of String. The filtered names should be collected in a List to print the result. Make sure to
Spring Boot – Replace tomcat server with jetty
By default, Spring Boot uses Tomcat as an embedded server. This post describes how to replace Tomcat with the Jetty server using Maven and Gradle configuration. When you use Spring Web starter it ships with an embedded tomcat server. To replace the tomcat server with jetty first we need to exclude it from the Maven
Java Delete Certificates from Cacerts Keystore
We saw how to import and list certificates. The certificates are stored with alias names. We can delete certificates from the Cacerts Keystore file. Sometimes you might have added a certificate by mistake. Using the keytool delete command, the certificates can be removed one by one using their alias name. Syntax We have used two
Java Import Certificates to Cacerts Keystore file
In our last post, we had discussed how to list Keystore certificates. Here we are going to see how to Import Certificates to the Cacerts Keystore file in Java. For importing certificates you have to add certificates one by one into the Keystore file. The certificates may have .cer extension. Application Servers like WebSphere and