Computer Science, asked by Avanya642, 7 months ago

Write a single line of code to print 4th character from a 3rd element of a string array str[ ].

Answers

Answered by rohitkhajuria90
0

System.out.println(sList.get(2).charAt(3));

where

sList is Array List

Answered by ojasmsn
0

Answer:

String[] str = {"Hello", "world", "today"};

System.out.println(str[2].charAt(3));  (In java)

str = ["Hello", "world", "today"]

print(str[2][3])    

(In python)

Similar questions