🚀 Join 1,200+ candidates currently preparing with PrimerPrep
Java Programming
Accenture Technical PrimermediumJava Programming5. Regular Expression

Observe the below code : String course="Java Programming"; char c=course.charAt(16); System.out.println(c); What will be the output for the above code snippet?

Answer options

A
charAt(16); System.out.println(c); What will be the output for the above code snippet?
B
StringIndexOutOfBoundsException
C
ArrayIndexOutOfBoundsException
D
Compilation error
E
g

Correct answer: StringIndexOutOfBoundsException

Explanation

Quick AnswerThe correct answer is StringIndexOutOfBoundsException because it directly addresses the core logic of Java Programming.

Correct answer: StringIndexOutOfBoundsException.

Related Accenture Java Programming questions

Practice more Accenture Java Programming questions

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!