java: ArrayList - how can i check if an index exists??

I'm using ArrayList<String> and I add data at specific indices, how can I check if a specific index exists? ...

Find the max of 3 numbers in Java with different data types?

Say I have the following three constants: final static int MY_INT1 = 25; final static int MY_INT2 = -10; final stat...

Convert a RGB Color Value to a Hexadecimal String?

In my Java application, I was able to get the Color of a JButton in terms of red, green and blue; I have stored thes...

Java/Groovy - simple date reformatting?

I'm new to Java/Groovy development and I have a simple string that I would like to reformat, however I get an 'Unpar...

Store text file content line by line into array?

all,I'm now facing the problem of no idea on storing the content in text file into the array. The situation is like,...

OOP Java: Creating a stock inventory program?

I am fairly new to object oriented programming, so I am still having some trouble grasping some of the basic concept...

Creating subset of a Set in Java?

I have a LinkedHashSet, i.e an ordered set. I'm trying to find a function to just return a subset of the set, i.e t...

How to get index of an item in java.util.Set?

I know the differences between Set and List(unique vs. duplications allowed, not ordered/ordered, etc). What I'm loo...