What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-26 07:00:02
java streams
the Stream API is used to process collections of objects. A stream is a sequence of objects that supports various methods which can be pipelined to produce the desired result. It is very similar to build().perform() method in Actions class. It is cha... Add solution -
Other 2021-09-25 19:11:02
Insertion sort code in Java
/** * Insertion sort algorithm, O(n^2) time complexity. */ public static void insertionSort(int[] arr) { int n = arr.length; for(int i = 1; i < n; i++) { int key = arr[i]; int j = i - 1; //shift until you find the position to place the ... Add solution -
Java 2021-09-25 18:35:05
Java sort Map by values
Map<String, Integer> unSortedMap = getUnSortedMap(); System.out.println("Unsorted Map : " + unSortedMap); //LinkedHashMap preserve the ordering of elements in which they are ins... Add solution -
C# 2021-09-24 15:58:02
c# new keyword
The new operator creates a new instance of a type. In the example below an object is created for the class using the new. Calculate c = new Calculate(); You can also use the new keyword to create an instance of the array. double[] points = new do... Add solution