1 / 8

Core Java Training in Chennai

Learn Core Java Training in Chennai from Accord which is the best java training institute in Chennai. Be job ready with our certification courses. Register with us today if you want to learn either just the basics and the core of java or J2EE which is advanced java training as we provide you with the best java courses in Chennai.

vikram99723
Download Presentation

Core Java Training in Chennai

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CORE Java Training in Chennai By Accordittraining.com

  2. Array of java • Topics: 1. What is Array? 2. Array variables 3. Pass by reference 4. Multidimensional Arrays

  3. What is an array? • An array is a very common type of data structure wherein all elements must be of the same data type. • Once defined, the size of an array is fixed and cannot increase to accommodate more elements. • The first element of an array starts with index zero. • Ex; x[0]=0; x[1]=1; x[2]=2; x[3]=3; x[4]=4; x[5]=5;

  4. ARRAY VARIABLES • Using an array in your program is a 3 step process - 1) Declaring your Array 2) Constructing your Array 3) Initialize your Array • 1) Declaring your Array Syntax: <elementType>[] <arrayName>;

  5. Contd…. • 2) Constructing an Array Syntax: arrayname = new dataType[] • 3) Initialize an Array Syntax: intArray[0]=1; // Assigns an integer value 1 to the first element 0 of the array intArray[1]=2; // Assigns an integer value 2 to the second element 1 of the array

  6. PASS BY REFERENCE • Arrays are passed to functions by reference, or as a pointer to the original. This means anything you do to the Array inside the function affects the original.

  7. MULTI DIMENSIONAL ARRAY • Multidimensional arrays are actually arrays of arrays. • To declare a multidimensional array variable, specify each additional index using another set of square brackets. • Ex: inttwoD[ ][ ] = new int[4][5] ; • When you allocate memory for a multidimensional array, you need only specify the memory for the first (leftmost) dimension. • You can allocate the remaining dimensions separately.

  8. Contact us www.accordittraining.com EMAIL:enquiry@accordittraining.com CALL US (+91) 994 028 9059

More Related