Skip to content

Instantly share code, notes, and snippets.

@kyontan
Created June 2, 2015 15:51
Show Gist options
  • Save kyontan/b151a552786431230af7 to your computer and use it in GitHub Desktop.
Save kyontan/b151a552786431230af7 to your computer and use it in GitHub Desktop.
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Test
{
public static void main (String[] args) throws java.lang.Exception
{
LinkedList<LinkedList<String>> squares = new LinkedList<>();
// LinkedList<LinkedList<String>> squares = new LinkedList<LinkedList<String>>();
squares.add(new LinkedList<>());
squares.get(0).add("hoge");
System.out.println(squares.get(0).get(0)); // hoge
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment