Announcement

Collapse
No announcement yet.

Can EFS editor use java's list function?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can EFS editor use java's list function?

    My study has to use listarray function. However, the test codes I wrote in order to verify whether I can use this function cannot be operated.

    the following is my code:

    import java.util.ArrayList;
    public class Test1
    {
    public static void main(String[] args)
    {
    ArrayList<integer>list=new ArrayList<integer>();
    list.add(5);
    list.add(3);
    list.add(2);
    list.add(4);
    list.add(1);
    for (int i=0;i<list.size()-1;i++)
    { for(int j=1;j<list.size()-i;j++)
    { integer a;
    if((list.get(j-1)).compareTo(list.get(j))>0)
    { a=list.get(j-1);
    list.set((j-1),list.get(j));
    list.set(j,a);
    }
    }
    }
    for(integer s:list)
    { System.out.println(s.intValue());
    }



    }
    }

    Can somebody tell me where is the mistake, or whether this function is totally not allowed to be used in EFS editor.

    Thanks a lot~

  • #2
    You think that EFS code is built on top of Java. It's not. It's built on top of Javascript.

    There's lots of tutorials on Javascript array manipulation you can look up through Google and it's not near as tedious to deal with as what you're showing in that Java example.
    Last edited by SteveH; 08-28-2011, 01:38 PM.

    Comment


    • #3
      Originally posted by SteveH
      You think that EFS code is built on top of Java. It's not. It's built on top of Javascript.

      There's lots of tutorials on Javascript array manipulation you can look up through Google and it's not near as tedious to deal with as what you're showing in that Java example.

      thanks a lot~ I've resolved this problem several days ago. google is quite a good tool~

      Comment

      Working...
      X