In this case, you could create e new String from your array of chars and then do an indeoxOf(“e”) on that String:
System.out.println(new String(list).indexOf("e"));
But in other cases of primitive data types, you’ll have to iterate over it.
More Related Contents:
- How to find the index of an element in an int array?
- Algorithm for taking elements from an in[] array and concatenating them [closed]
- How do i format a ArrayList for printing?
- Does an Array’s specified capacity include 0?
- How to put one dimensional array in 2d array java
- Make copy of an array
- How to convert int[] into List in Java?
- Java Array, Finding Duplicates
- How can I convert int[] to Integer[] in Java?
- How to create correct JSONArray in Java using JSONObject
- string to string array conversion in java
- Why isn’t there a java.lang.Array class? If a java array is an Object, shouldn’t it extend Object?
- Connect 4 check for a win algorithm
- How can I create an Array of ArrayLists?
- How do you find the sum of all the numbers in an array in Java?
- Why does println(array) have strange output? (“[Ljava.lang.String;@3e25a5”) [duplicate]
- How to convert a 1d array to 2d array?
- “Cannot create generic array of ..” – how to create an Array of Map?
- Why does Java allow arrays of size 0?
- PDF to byte array and vice versa
- Java: BufferedImage to byte array and back
- Java Array of unique randomly generated integers
- Java Arrays.asList on primitive array type produces unexpected List type [duplicate]
- Creating nested JSON object for the following structure in Java using JSONObject? [closed]
- If a char array is an Object in Java, why does printing it not display its hash code?
- Combine two integer arrays [duplicate]
- casting Arrays.asList causing exception: java.util.Arrays$ArrayList cannot be cast to java.util.ArrayList
- How can I convert a Java HashSet to a primitive int array?
- Sorting two arrays simultaneously
- Why does array indexing in Java start with 0?