How-to articles, tricks, and solutions about FRAMEWORKS

Finding the max/min value in an array of primitives using Java

To find the maximum value in an array of primitives in Java, you can use the Arrays.stream() method to create a stream from the array, and then use the Stream.max() method to find the maximum element in the stream. Here is an example of how to do this for

How to get root directory in yii2

In Yii2, you can use the following code to get the root directory: