Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems with List<Object[]>

843793Jun 11 2003 — edited Jul 9 2003
Hi!

The following code does not compile with the new javac prototype:
class GJTest
{
	private void foo()
	{
		List<Object[]> list = new ArrayList<Object[]>();
		Object o1 = list.get(0)[0];
	}
}
Error message:

C:\Dokumente und Einstellungen\hans\NewGJTest\NewGJTest.java:8: array required, but java.lang.Object[] found
Object o1 = list.get(0)[0];


Looks like a bug in the prototype. Or am I missing something?


Hans
--
Hans Kratz
Omnicore Software
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2003
Added on Jun 11 2003
7 comments
221 views