#29 Multi Dimensional Array in Java

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2024

Комментарии • 44

  • @ayodhyarode
    @ayodhyarode Год назад +13

    Sir you teach every concept in an Amazing way. It is helping me to understand everything. Thanks a lot sir 🙏😊

  • @Abbydups
    @Abbydups Год назад +19

    You’re such an angel! You helped me so much in understanding my homework.

  • @sarathchandar5047
    @sarathchandar5047 Год назад +16

    Big fan of u Navin sir … fantastic series of java … like u had for python

  • @MdKamrulIslam-lo9xn
    @MdKamrulIslam-lo9xn 8 месяцев назад +2

    creating an object of the Random class could also be done here to do the job:
    Random random = new Random();
    nums[ i ] [ j ] = random.nesxtInt(); // put the upper limit inside the nextInt bracket if you want an upper limit.

  • @cramyboba1013
    @cramyboba1013 Год назад +2

    You helped me a lot with my homeworks sir, thank you from Myanmar

  • @yashaswinihm4288
    @yashaswinihm4288 11 месяцев назад +10

    Normal for loop is better and clear than enhancled for loop

    • @samantsrivastava8170
      @samantsrivastava8170 9 месяцев назад +2

      Yes

    • @SanataniRishu02
      @SanataniRishu02 4 месяца назад

      Nah enhanced for loop is much better you just have to understand that in enhanced for loop : iterates over a element in group

  • @shenbagamr421
    @shenbagamr421 Год назад +6

    Nice teaching nallave puriyuthu bro❣️

    • @sindhisajadali610
      @sindhisajadali610 Год назад

      Sir that's best
      Collection of lectures
      Plz share
      Assimignment or H. W
      It's easy way to students understand and do H. W

  • @egor_andryushchenko
    @egor_andryushchenko 10 месяцев назад

    Thank you for this lesson, I have enjoyed it a lot, reminds me of my time in university with C++.

  • @DarkyBoy-n1i
    @DarkyBoy-n1i 4 месяца назад

    Yes, I do as you said after watching.

  • @GargeyasaikrishnaChava
    @GargeyasaikrishnaChava 10 месяцев назад +3

    I think this topic is less used in daliy life purposes

  • @elikmtl
    @elikmtl Год назад

    The best explanation ever! Thank you very much.

  • @aids9918
    @aids9918 4 месяца назад

    Awesome tutorial!

  • @LearnSnowflakewithGoldflake
    @LearnSnowflakewithGoldflake Год назад +1

    broo navin bro thandani thane thane thandane thane thane noo brooo super explanation

  • @sentfromheaven00
    @sentfromheaven00 Год назад +1

    What program do you use to draw the diagrams for us? I really like it

  • @mrgold8267
    @mrgold8267 Год назад +3

    Why don't we do this: Random rand = new Random();
    import java.util.Random;
    class Main
    {
    public static void main(String[] args)
    {
    Random rand = new Random();
    int[][] arr = new int[5][];
    for(int i = 0; i < arr.length; ++i)
    {
    arr[i] = new int[rand.nextInt(5,10)];
    for (int j = 0; j < arr[i].length; ++j)
    {
    arr[i][j] = rand.nextInt(0,10);
    }
    }
    for(int i = 0; i < arr.length; ++i)
    {
    for (int j = 0; j < arr[i].length; ++j)
    {
    System.out.print(arr[i][j] + " ");
    }
    System.out.println();
    }
    }
    }

  • @kvelez
    @kvelez Год назад +2

    import java.util.Arrays;
    public class Main{
    public static void main(String[] args) {
    int[][] nums = new int[3][4];

    for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 4; j++) {
    int random = (int)(Math.random() * 10);//type casting
    nums[i][j] = random;
    System.out.print(random + " ");//row limit
    }
    System.out.println();//line break
    }
    System.out.println();//For each format
    for (int[] num : nums) {
    System.out.println(Arrays.toString(num));
    }
    System.out.println();//For each format
    for (int[] is : nums) {
    for (int is2 : is) {
    System.out.print(is2 + " ");
    }
    System.out.println();
    }
    }
    }

  • @shaikbasha3882
    @shaikbasha3882 Год назад

    if you are here then i would have kissed on your head man, you just clarified all the doubts which was there from ages ..

  • @sindhunayak9354
    @sindhunayak9354 5 месяцев назад +1

    Who don't have laptop or desktop
    And practice with mobile

    • @rohitpal73
      @rohitpal73 4 месяца назад

      Lol 😂😂😂😂

    • @kuchbhi7118
      @kuchbhi7118 Месяц назад

      Well my father will buy me one this diwali.. what about you did you finish java ?

  • @YoutubeCom-de9ye
    @YoutubeCom-de9ye Год назад +2

    Sir pls give free coupon code for your Udemy course. It's an amazing course and your explanation it just excellent

  • @emerald8743
    @emerald8743 6 месяцев назад

    @Telusko, The main array is 3 rows and one column right? I see there is only one column for main array which has 3 arrays. The four columns are of internal arrays right?

  • @praveenr7957
    @praveenr7957 Год назад +1

    I run array in vs code it gives something main error. But I run in Eclipse it gives output.

  • @adityakaushik2845
    @adityakaushik2845 Год назад +5

    Math.random not working in my compiler.why??

    • @nikilkandula8562
      @nikilkandula8562 Год назад +1

      First u have to import it's library

    • @AravStark
      @AravStark Год назад

      You have to import it bro

    • @lohithareddy15
      @lohithareddy15 Год назад

      @@nikilkandula8562 how can i import math library in vs codde.....can u please help me

    • @ArjunU931
      @ArjunU931 Год назад +2

      ​​@@lohithareddy15 type this code in the first line ok. " import java.lang.Math; ". 😊

    • @cosmesumagaysay7126
      @cosmesumagaysay7126 8 месяцев назад

      ​@@lohithareddy15import java.util.Random;

  • @manavkaneria
    @manavkaneria Год назад

    What's about if we want to take input from the user?

  • @LAVAN-2424
    @LAVAN-2424 11 месяцев назад

    sir why to take random Values teach and insert user given values.

  • @AravStark
    @AravStark Год назад

    I had a doubt, while typing it in the comments, it was solved 🤣🤣🤣

  • @nikilkandula8562
    @nikilkandula8562 Год назад

    Sir can we scanner class to intialise variables

    • @The_Motobikers_World
      @The_Motobikers_World Год назад

      Yes, scanner class should be in a nested loop where outer loop represent the row no(no of array )and inner loop represent the column (no of elements in the array) .
      The syntax will be:-
      Arr[row][column]=sc.nextInt();//before that you should include the scanner class in your code and create an object of that .

  • @FahadAli-i9x
    @FahadAli-i9x Год назад

    How can we ourself initialize the multidimensional array as we do in 1d array

    • @The_Motobikers_World
      @The_Motobikers_World Год назад

      Just simply assigned the value in row and column format where row represent the no of array and column represent the no of elements in the array .
      Just for example first array 0th element we have to write
      Array[0][0]=some value;
      Like wise that second array third element supposed the array size is of 3
      Then the syntax will be
      Array[1][3]=some value;

    • @The_Motobikers_World
      @The_Motobikers_World Год назад

      Another way
      scanner class should be in a nested loop where outer loop represent the row no(no of array )and inner loop represent the column (no of elements in the array) .
      The syntax will be:-
      Arr[row][column]=sc.nextInt();//before that you should include the scanner class in your code and create an object of that .

  • @malikmhuzaifa8171
    @malikmhuzaifa8171 21 день назад

    kuj smj ni andi

  • @ДмитрийЕрошин-е8ш
    @ДмитрийЕрошин-е8ш 8 месяцев назад

    после активации бота, подскажите, как можно включить текущую сетку? не могу что то найти кнопку