Types of array in java

Опубликовано: 09 Январь 2025
на канале: Accepted Piece
164
3

Types of array in java
Hey what's up guys welcome back to this video in this video or going to talk about different types of Array there are two types of Array one dimensional array and multi dimensional array in this video and in this course we talk about two dimensional array.
will not talk about 3 4 or 5 dimensional array for most of the case use one dimensional array and two dimensional array. it we use one dimensional array and two dimensional array as multi-dimensional array in this video and in the course will talk about to TD array this is an example of one dimensional array. now let's talk about one dimensional array in details in one dimensional array is event is represented by single subscript the elements are stored in consecutive memory location Will see how arrangement stored in Computer memory in the next video give an example of an array we have declared an array of length 10 the size of this array is 10 and here we have ten elements is available represented something like this we have index number from 0 to 9 and you have the elements from 1 to 10 If we say everyone and here in between this bracket we have one this is index number so at index one we have the element two it will return two if I say here array four then what you will return refer then it will return 5 index 4 we have the value 5 if we say here array 7 then what it will return it will return this value eight because at index 7 we have the value eight understood the concept of fundamental and let's talk about two dimension Hope unrested the concept of one dimensional array and let's talk about two dimensional array in two dimensional array , each element is represented by two subscript a two dimensional array m×n has m rows and n columns & contains m×n elements. This is an example of TD array it has three rows and four columns and this about represented something like this this is true we have three row and we have four column index number of is row and column I here if we say everyone to hear one means here one means the row index and two means the column index here at row one this is row one and column 2 so at source of the value 40. It will return 40 you please say I will to two row and column one where the value 300 so it will return 300 anyway any two three at row 3 at column 3 we have the value 500 it's written the value
#java #corejava #javaprogramming #apnacollge #coding #javaforplacement