Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

How to find the position in array if two values are same?

$
0
0
I want to find the position of "4" of the followings array but there are two "4".

public class test{
    public static void main(String[] args) {
	int[] marks = {1, 2, 3, 4, 4, };

    }
}

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>