Java Tutorial - 03 - Search for the Max and Min Value of an Array

preview_player
Показать описание

Learn how to program in java with our online tutorial. We will cover variables, loops, if else branching, arrays, strings, objects, classes, object oriented programming, conditional statements, and more.

Here we learn how to use Java arrays to search for the minimum and maximum of a set of values.
Рекомендации по теме
Комментарии
Автор

Learned a loot from you
for(int i=0;
{
System.out.println("Thank you So much");
}

rupalpatel
Автор

Wait, I would consider myself the dumbest person on earth when it comes to computers or maths and all. But these tutorials of urs are life savers for me trust me your way of teaching is beyond anything i m sooo grateful for these tutorials of yours through which i have had a very reasonable understanding of what arrays are thanks a tons

amiereviews
Автор

Your clarification saved me. Thanks! please make more simplified and quality content like this. You're awesome!

zameiln
Автор

I wish that I could like it more than once! You explained it so much better then my professor

blakemccann
Автор

The best explanation I have ever come across to the min and max logic. Thanks

princepharis
Автор

The best explanation I have ever come across to the min and max logic. Thank you very much

elchinhumbatov
Автор

Instead of the actual size of the array, i would use the .length - 1 function of java because imagine if we dont know the actual size of the array. The result would be the same.

kelvincheng
Автор

I liked the output in the loop. It shows how the loop is finding the numbers.

patrick_kyker
Автор

Your videos are a game changer. Thank you so much.

elizabethtackett
Автор

*accidentally screamed no, in the office, when I saw you write the print statements in the for loop*

joshthompson
Автор

Thank you man you saved my assignment mark :)

crazypilot
Автор

Bro.. You just answered my assignment.

rodelcrisosto
Автор

This helped me a lot sir love this ❤️

karanverma
Автор

Il follow your videos as a bee tracks the flowers, just amazing explanation

Fnaf-vhcs
Автор

i love you so much thank god for this video

seankaminsky
Автор

I think this is the shortest version

import java.util.Arrays;
public class Main {
public static void main(String[] args) {
int[] numbers = {-1, 10, 5, 8, 3, 1, 2, 4, 7, 9, 6};
System.out.println("The original array is number[] = " + Arrays.toString(numbers));
Arrays.sort(numbers);
System.out.println("The smallest value is: " + numbers[0]);
System.out.println("The largest value is: " + numbers[numbers.length-1]);
}
}

arjayaranas
Автор

Awesome explanation! But its better if you organize your videos to make it easily accessible.

alulapetros
Автор

Q1: Generate an array of number 1 to 200 by using For-loop, then display on a Graph Indicator.
need answer please

gnng
Автор

Thanks só much you help me that have manu days Lost search the solution this problema i'vd live in Brazil.

juniormacedo
Автор

couldnt you just use the max and min functions?

liamhoward