Sollicitatievraag

Sollicitatiegesprek voor de functie Java Developer

-

Mobicule

If you add an element at a[1] position in arreylist and access a[2] element,what will happen?

Antwoord

Antwoorden op sollicitatievragen

9 antwoorden

1

Let arraylist contains {5,6,4,3,1} If you add 2 at 0th position then arraylist become {2,5,6,4,3,1} So according to question you will get old element of a[1] at a[2]'s position

Anoniem op

1

We will get runtime exception:ArrayIndexOutOfBoundException

Anoniem op

1

Let arraylist contains {5,6,4,3,1} If you add 2 at 0th position then arraylist become {2,5,6,4,3,1} So according to question you will get old element of a[1] at a[2]'s position

Anoniem op

0

ArrrayIndexOutOfBoundException

Abc op

0

Let arraylist contains {5,6,4,3,1} If you add 2 at 0th position then arraylist become {2,5,6,4,3,1} So according to question you will get old element of a[1] at a[2]'s position

Anoniem op

0

Let arraylist contains {5,6,4,3,1} If you add 2 at 0th position then arraylist become {2,5,6,4,3,1} So according to question you will get old element of a[1] at a[2]'s position

Anoniem op

0

Let arraylist contains {5,6,4,3,1} If you add 2 at 0th position then arraylist become {2,5,6,4,3,1} So according to question you will get old element of a[1] at a[2]'s position

Anoniem op

0

Let arraylist contains {5,6,4,3,1} If you add 2 at 0th position then arraylist become {2,5,6,4,3,1} So according to question you will get old element of a[1] at a[2]'s position

Anoniem op

0

Let arraylist contains {5,6,4,3,1} If you add 2 at 0th position then arraylist become {2,5,6,4,3,1} So according to question you will get old element of a[1] at a[2]'s position

Anoniem op

Voeg antwoorden of opmerkingen toe

Meld u aan of registreer u om hier een opmerking over te maken.