The Artima Developer Community
Sponsored Link

Java Buzz Forum
How to find index of item in Array in Java

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 1090
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
How to find index of item in Array in Java Posted: Oct 26, 2012 9:01 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: How to find index of item in Array in Java
Feed Title: Java67
Feed URL: http://www.java67.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement


find index of object in Array
While programming in Java, many times we need to check if an String array contains a particular String or an int array contains a number or not. Though array is an object in Java but it does not provide any convenient method to perform these kind of operation. Some time you even need index of an item stored in Array, unfortunately Java API does not provide any direct method. Thanks to open Source Apache Commons provides a utility class called ArrayUtils which allows you to check for an Item in Array, find its index in array, find its lastIndex in Array and perform several other common operations. In fact ArrayUtils has overloaded methods for different kind of Array e.g. String, int, float, double, Object etc, which makes this kind of programming task trivial. In this article we will see an Apache commons example of How to use ArrayUtils class to search an item in Array and find its index.
Read more ยป

Read: How to find index of item in Array in Java

Topic: Setting up and playing with Apache Solr on Tomcat Previous Topic   Next Topic Topic: Better Line Endings Managing in IntelliJ IDEA 12

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use