Ok so this is my code:
import java.util.Scanner;
public class Bubble {
public static void main(String[] args) {
String prefix;
int arr[];
Scanner reader = new Scanner(System.in);
System.out.println("What size would you like your array to be?");
int arrSize = reader.nextInt();
arr = new int[arrSize];
for(int i = 1; i==arrSize; i++) {
if((i % 10)==1 && i != 11) {
prefix = "st";
}else if((i % 10)==2 && i != 12) {
prefix = "nd";
}else if((i % 10)==3 && i != 13) {
prefix = "rd";
}else{
prefix = "th";
}
System.out.println("What would you like the"+ i + prefix +"number in the array to be?");
int arrNum = reader.nextInt();
}
System.out.println(arr);
}
}
Now when I press run I get this:
What size would you like your array to be?
Then I put in an integer, say 3, then I get this:
[I@55f96302
It stays the same no matter what integer i use.