Welcome to JavaRanch
Please use code tags while posting question it simple just select your code and click on Code tag in the window where you are writing Question
The problem is that TempArray is an inner class of Test. Therefore you need an instance of Test to create an instance of TempArray.
You can make TempArray a not-inner class or use an instance of Test to create a TestArray: new Test().new TestArray();
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.