0
why does it print out C
public class Program { public static void main(String[] args) { String[ ] myNames = { "A", "B", "C", "D"}; System.out.println(myNames[2]); } }
3 Answers
+ 5
couse the index starts from zero not one
myNames [0] ăA
myNames [1] ăB
myNames [2] ăC
0
oh ok thank you
0
it myNames[2]=C