scala array ArrayIndexOutOfBoundsException: : val str = line.split(":")
		
println(line.split(':')(1))

When the index is one I get the java.lang.ArrayIndexOutOfBoundsException: 1 but when I put the index as 0 no issues at all. 

I am new to Scala btw..