FAQ
I want use list to implement it. Because I want delete one row or delete
one field, such as this in Java:

LinkedList<LinkedList<Integer>> data = new
LinkedList<LinkedList<Integer>>();
for (Iterator<LinkedList<Integer>> o = data.iterator(); o.hasNext();) {
LinkedList<Integer> list = o.next();
for (Iterator<Integer> i = list.iterator(); i.hasNext();) {
Integer value = (Integer) i.next();
if (value == 1) {
o.remove();
}
}
}

I have looked up the document of list in Go. I find it's so different with
Java.
On Thursday, September 26, 2013 11:31:46 PM UTC+8, Jakob Borg wrote:

2013/9/26 hao5ang <wao...@gmail.com <javascript:>>:
I want one resizable two-dimension array. Actually I need change below Java
code to Go.

LinkedList<LinkedList<Integer>> data = new
LinkedList<LinkedList<Integer>>();
for (LinkedList<Integer> list : data) {
for (Integer value : list) {
System.out.println(value);
}
}
http://play.golang.org/p/XJXzU92yQd

//jb
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 10 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 26, '13 at 10:01a
activeSep 27, '13 at 6:39a
posts10
users5
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase