Array Interview Question

 Array

=====

We can store multiple values of similar datatypes in a single variable

Similar datatypes

Index based

Index starts from 0 to n-1.

Array syntax

=============

DataType variable [] = new Datatype [Size];


2D Array

==========================

DataType variable [ ] [ ] = new Datatype [size] [size];



DisAdvantages of

------------------

We can store only the similar datatypes

once we fixed the size we cant modified

memory wastage is high


normal enhanced forloop (for each)

==================================

index based value based

condition set        no condition

Chances of error    less chance of error

Comments

Popular posts from this blog

Inheritance and Type of Inheritance

DAY 1: Java Course Notes

Interview Topics for Software Testers and QA