Ad
  • Default User Avatar

    i would add as a follow up that to have resizable lists like the builtin python, java's ArrayList provides similar functionality

  • Custom User Avatar

    Both codes have the same mistake: you are trying to initialize elements in array despite it doesn't have any elements to begin with.

    Maybe you should change the initializtion of array — like, add the size of it or smth...

  • Custom User Avatar

    This should've been resolved.

  • Custom User Avatar

    Original author is inactive. Anybody who can approve this, please do.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I can't run any java program because I get java error.
    Do you have any idea what does it mean?
    Here is a part of whole error:

    Error: Command failed: javac -verbose -cp /home/codewarrior -d /home/codewarrior -sourcepath /home/codewarrior -cp /usr/local/groovy/lib/junit-4.12.jar:/usr/local/groovy/lib/hamcrest-core-1.3.jar /home/codewarrior/Sid.java /home/codewarrior/Test.java ./frameworks/java/CwRunListener.java
    [parsing started RegularFileObject[/home/codewarrior/Sid.java]]
    [parsing completed 29ms]
    [parsing started RegularFileObject[/home/codewarrior/Test.java]]
    [parsing completed 6ms]
    [parsing started RegularFileObject[./frameworks/java/CwRunListener.java]]
    [parsing completed 10ms]
    [search path for source files: /home/codewarrior]
    [search path for class files: /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar,/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar,/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar,/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar,/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar,/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar,/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar,/usr/lib/jvm/java-8-oracle/jre/classes,/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar,/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar,/usr/lib/jvm/java-8-