Arrays in java

preview_player
Показать описание
Java tutorial for beginners playlist

What is an array
1. Container that holds fixed number of values
2. All values are of single type
3. Length of Array is fixed during creation

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.

Array Example
String[] args in main function

Declaring one dimensional array in java

int[] anArray; // declares an array of integers
char[] charArray; // declares character array

Another form of declaration

int anArray[];
char charArray[];

Initializing one dimensional array in java

int[] anArray = new int[10];
OR
int[] anArray;
anArray = new int[10]

Shortcut to initialization
int[] anArray = { 100, 200, 300, 400, 500 }

Multidimensional Array in Java
In a multidimensional array, each element is an array

int[][] matrix = new int[5][5];

int[][] matrix = {
{ 1, 0, 1},
{ 1, 1, 1},
{ 1, 1, 0}
};
Рекомендации по теме
Комментарии
Автор

Thank you! I learned a lot about erés!^^

EMonzon
Автор

good explanation, keep it up, thank you

SmartProgramming
Автор

sir will u teach all Java technologies

kondasaikumar
Автор

thanks for the great Help!! however, the volume of the is very low and please upload more videos with more practical examples.. thanks again

priyankaghodke
Автор

hello sir, may you help me, i want Retrieve multiple rows to multiple texbox in asp.net ...plzzz help me give me code/ video or link

DeepakGupta-zuxz