aboutsummaryrefslogtreecommitdiff
path: root/website/usageExamples/valExample_post.jpage
diff options
context:
space:
mode:
Diffstat (limited to 'website/usageExamples/valExample_post.jpage')
-rw-r--r--website/usageExamples/valExample_post.jpage21
1 files changed, 21 insertions, 0 deletions
diff --git a/website/usageExamples/valExample_post.jpage b/website/usageExamples/valExample_post.jpage
new file mode 100644
index 00000000..fa2e852e
--- /dev/null
+++ b/website/usageExamples/valExample_post.jpage
@@ -0,0 +1,21 @@
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ValExample {
+ public String example() {
+ final ArrayList<String> example = new ArrayList<String>();
+ example.add("Hello, World!");
+ final String foo = example.get(0);
+ return foo.toLowerCase();
+ }
+
+ public void example2() {
+ final HashMap<Integer, String> map = new HashMap<Integer, String>();
+ map.put(0, "zero");
+ map.put(5, "five");
+ for (final Map.Entry<Integer, String> entry : map.entrySet()) {
+ System.out.printf("%d: %s\n", entry.getKey(), entry.getValue());
+ }
+ }
+}