import java.util.stream.IntStream;
public class MyClass {
public static void main(String args[]) {
String[] arr = { "java", "c", "c++", "python", "c#" };
IntStream.range(0, arr.length)
.mapToObj(index -> String.format("%d -> %s", index, arr[index]))
.forEach(System.out::println);
}
}
/*
run:
0 -> java
1 -> c
2 -> c++
3 -> python
4 -> c#
*/