Latest Posts

LRU Cache Java

LRU Cache Implementation in Java

What is LRU Cache? LRU Cache stands for Least Recently Used Cache. The size of the cache is fixed and it supports get() and put() operations. When the cache is full, the put() operation removes….

System.arraycopy()

Java System.arraycopy() Method Examples

Java System.arraycopy() is a native static method to copy elements from the source array to the destination array. System.arraycopy() Method Arguments The System.arraycopy() method signature is: public static native void arraycopy(Object src, int srcPos, Object….

Shuffle Array Elements

How to Shuffle an Array in Java

There are two ways to shuffle an array in Java. Collections.shuffle() Method Random Class 1. Shuffle Array Elements using Collections Class We can create a list from the array and then use the Collections class….

Java Collectors Example

Java Collectors Class – 18 Examples

Java Collectors is a utility class that provides many useful implementations of the Collector interface. The Collector implementation is used with the Stream collect() method. This class was introduced in Java 8 along with Stream….

Java Method Reference

Java Method Reference Types and Examples

Java Method Reference was introduced in Java 8, along with lambda expressions. The method reference is a shortcut way to create lambda expressions when it just calls a method. What is Java Method Reference? The….

Java Stream Collect

Java Stream collect() Method Examples

Java Stream collect() performs a mutable reduction operation on the elements of the stream. This is a terminal operation. What is Mutable Reduction Operation? A mutable reduction operation process the stream elements and then accumulate….

Java Array Contains

How to Check if Java Array Contains a Value?

How to Check if Java Array Contains a Value? There are many ways to check if a Java array contains a specific value. Simple iteration using for loop List contains() method Stream anyMatch() method Arrays….

Top 11 Interview Preparation Books for 2019

Nowadays everybody is consuming a lot of information way too fast. The ways to take care of tasks, difficulties, and problems have been remastered. Now people tend to search for shortcuts to solve their problems…..

Overriding vs Overloading in Java

Overriding and Overloading are the core concepts in Java programming. They are the ways to implement polymorphism in our java programs. Polymorphism is one of the OOPS Concepts. 1. What is Overloading and Overriding? When….

Python Square Root

Python Square Root of a Number

There are many ways to find the square root of a number in Python. Exponent Operator Math.sqrt() function Math.pow() function 1. Using Exponent Operator for Square Root of a Number num = input(“Please enter a….

close
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages