Skip to content

Category Archives: Java Programs

The array() method of java.nio.FloatBuffer Class is used to Return the float array that backs this buffer. Modifications to this buffer’s content will cause the… Read More
DoubleStream.Builder accept(double t) is used to insert an element into the element in the building phase of stream. It accepts an element to the stream… Read More
Given String str and an integer k, find the lexicographically smallest and largest substring of length kLexicography order, also called as alphabetical order or dictionary… Read More
HashMap stores the data in (Key, Value) pairs, and you can access them by an index of another type. HashMap class implements Map interface which… Read More
DoubleStream.Builder build() builds the stream, transitioning this builder to the built state. Syntax : DoubleStream build() Return Value: This method returns the built stream. Note:… Read More
LongStream.Builder build() builds the stream, transitioning this builder to the built state. Syntax : LongStream build() Return Value: This method returns the built stream. Note:… Read More
Prerequisite: Round Robin Scheduling with arrival time as 0 A round-robin scheduling algorithm is used to schedule the process fairly for each job a time… Read More
Cryptography can be defined as an art of encoding and decoding the patterns (in the form of messages). Cryptography is a very straightforward concept which… Read More
The BiFunction Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents… Read More
Given a sorted array and a target value, find the first element that is strictly smaller than given element.Examples:   Input : arr[] = {1, 2,… Read More
Given a sorted array and a target value, find the first element that is strictly greater than given element. Examples:  Input : arr[] = {1,… Read More
Web server log which maintains a history of page requests, typically appended to the end of the file. Information about the request, including client IP… Read More
Given ‘num’ which indicates number of lines.The task is to print a trapezium pattern in num lines.Examples:   Input : 4 Output : 1*2*3*4*17*18*19*20 5*6*7*14*15*16 8*9*12*13… Read More
Java 8 introduced a new method called as parallelSort() in java.util.Arrays Class. It uses Parallel Sorting of array elements Algorithm of parallelSort() 1. The array… Read More
Given two strings s1 and s2, write a snippet to check whether s2 is a rotation of s1. Strings may contain duplicates. Examples: Input :… Read More

Start Your Coding Journey Now!