Java - Medium Articles
Round 1: The first round was a coding round with 2 questions on mettl: Write a program to find sum of first largest k elements from… Read More
To get started with Servlets, let’s first start with a simple Servlet application i.e LifeCycle application, that will demonstrate the implementation of the init(), service()… Read More
A Comma-Separated Values (CSV) file is just a normal plain-text file, store data in column by column, and split it by a separator (e.g normally… Read More
Java Swing is a GUI (graphical user Interface) widget toolkit for Java. Java Swing is a part of Oracle’s Java foundation classes . Java Swing… Read More
What is Servlet Collaboration? The exchange of information among servlets of a particular Java web application is known as Servlet Collaboration. This enables passing/sharing information… Read More
Given a string, the task is to find all the palindromic sub-strings from the given string.In Set – 1, another approach has been already discussed… Read More
Robot is part of java.awt package . Robot class is basically used to generate native system input events for the purposes of self- running demos,… Read More
MouseListener and MouseMotionListener is an interface in java.awt.event package . Mouse events are of two types. MouseListener handles the events when the mouse is not in… Read More
Swing is GUI Widget Toolkit for Java. It is an API for providing Graphical User Interface to Java Programs. Unlike AWT, Swing components are written… Read More
JFileChooser is a part of java Swing package. The java Swing package is part of JavaTM Foundation Classes(JFC) . JFC contains many features that help… Read More
Java 9 onwards, you can include private methods in interfaces. Before Java 9 it was not possible. Interfaces till Java 7 In Java SE 7… Read More
Message dialogs provide information to the user. Message dialogs are created with the JOptionPane.showMessageDialog() method. We call the static showMessageDialog() method of the JOptionPane class… Read More
Callback in C/C++ : The mechanism of calling a function from another function is called “callback”. Memory address of a function is represented as ‘function… Read More
New date-time API is introduced in Java 8 to overcome the following drawbacks of old date-time API :  Not thread safe : Unlike old java.util.Date… Read More
IntStream sum() returns the sum of elements in this stream. This is a special case of a reduction. IntStream sum() is a terminal operation i.e,… Read More
IntStream range(int startInclusive, int endExclusive) returns a sequential ordered IntStream from startInclusive (inclusive) to endExclusive (exclusive) by an incremental step of 1. Syntax : static… Read More
IntStream iterator() returns an iterator for the elements of this stream. It is a terminal operation i.e, it may traverse the stream to produce a… Read More
Below given are some methods which can be used to convert Stream to Set in Java. Method 1 : Using Collectors Stream collect() method takes… Read More
We generally iterate through the list when adding integers in a range, but java.util.stream.Stream has a sum() method that when used with filter() gives the… Read More
Stream mapToInt(ToIntFunction mapper) returns an IntStream consisting of the results of applying the given function to the elements of this stream. Stream mapToInt(ToIntFunction mapper) is… Read More