Computer Applications
The output of the below statement is:
String a[] = {"Atasi", "Aditi", "Anant", "Amit", "Ahana"};
System.out.println(a[1].charAt(1) + "*" + a[2].charAt(2));
- da
- d*a
- ti
- t*i
Java Arrays
2 Likes
Answer
d*a
Reason — In the array, a[1] is "Aditi", so a[1].charAt(1) gives 'd'. Similarly, a[2] is "Anant", so a[2].charAt(2) gives 'a'. The expression uses "*" as a String, so the + operator performs concatenation, resulting in "d*a".
Answered By
1 Like
Related Questions
What is the type of parameter to be given for the method parseInt()?
- double
- String
- char
- int
To extract the word NOW from the word "ACKNOWLEDGEMENT", the Java statement
"ACKNOWLEDGEMENT".substring(3, ...............)is used.Choose the correct number to fill in the blank.
- 6
- 7
- 5
- 8
Which of the following String methods returns a negative value?
- length()
- equals()
- compareTo()
- charAt()
An array with 3 elements is arranged in a ascending order as follows:

Name the technique used:
- Bubble sort
- Linear Search
- Selection sort
- Binary Search