| java | nice |
|---|---|
package test;
public class Foo {
static public String sayHello() {
System.out.println("hello");
}
}
|
package test;
public void main(String[] args) {
Foo.sayHello();
}
|
package test;
public class Foo {
static public String sayHello() {
return "hello";
}
}
|
package test;
public void main(String[] args) {
println(Foo.sayHello());
}
|
package test1;
import java.util.*;
public class Foo {
static public List getList() {
List l = new ArrayList();
l.add("one");
l.add("two");
return l;
}
}
|
package test1;
import java.util.*;
List<String> getList() = native List Foo.getList();
public void main(String[] args) {
getList().foreach(String s => println(s));
}
|
List, Collection, Map, ...), then you need a native declaration in Nice to specify their precise type.
I added verbatim in addition to pre to solve this problem. Isn't there a simpler way, like a <code> tag? Could be define that in TWiki?
-- DanielBonniot
I think wiki cannot handle this -- AlexGreif
| Topic UsingJavaFromNice . { Edit | Attach | Ref-By | Printable | Diffs | r1.3 | > | r1.2 | > | r1.1 | More } |
|
Revision r1.3 - 07 Mar 2003 - 14:45 GMT - AlexGreif Parents: WebHome > NiceTutorial |
Copyright © 1999-2003 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback. |