-
Java Bubble sort example
Bubble sort is the simplest sorting algorithm, it compares the first two elements, if the first is greater than the second, swaps them, continues doing (compares and swaps) for the next pair of adjacent elements. It then starts again with the first two elements, compares, swaps until no more swaps are required.
Date: 2019-08-11 View: 1520
-
Java Selection sort example
Selection sort is an in-place comparison sort. It loops and find the first smallest value, swaps it with the first element; loop and find the second smallest value again, swaps it with the second element, repeats third, fourth, fifth smallest values and swaps it, until everything is in correct order.
Date: 2019-08-11 View: 1520
-
Java List of available MessageDigest Algorithms
In Java, you can use the Security.getAlgorithms("MessageDigest") to list all the available MessageDigest algorithms.
Date: 2019-08-11 View: 1520
-
Java Prime Numbers examples
The following Java examples will print a list of all the prime numbers up to 1,000:
Date: 2019-08-11 View: 1520