diff options
author | Roel Spilker <r.spilker@gmail.com> | 2016-11-21 21:06:37 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2016-11-21 21:06:37 +0100 |
commit | 29e73a7915790ed27b2b68710dbe8e39f0e37e0d (patch) | |
tree | 6a2fda6b8714c7bef757ca35d4da8c010ece0eb9 /usage_examples/experimental/varExample_post.jpage | |
parent | 192c569128d1ffb879fb104f44483e394032a790 (diff) | |
parent | 69eeb9edc767bb3ceb0320bb5a0ea60dfabe827c (diff) | |
download | lombok-29e73a7915790ed27b2b68710dbe8e39f0e37e0d.tar.gz lombok-29e73a7915790ed27b2b68710dbe8e39f0e37e0d.tar.bz2 lombok-29e73a7915790ed27b2b68710dbe8e39f0e37e0d.zip |
Merge branch 'feature/var' of https://github.com/bulgakovalexander/lombok into bulgakovalexander-feature/var
Diffstat (limited to 'usage_examples/experimental/varExample_post.jpage')
-rw-r--r-- | usage_examples/experimental/varExample_post.jpage | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/usage_examples/experimental/varExample_post.jpage b/usage_examples/experimental/varExample_post.jpage new file mode 100644 index 00000000..25623510 --- /dev/null +++ b/usage_examples/experimental/varExample_post.jpage @@ -0,0 +1,21 @@ +import java.util.ArrayList; +import lombok.var; + +public class ValExample { + public String example() { + ArrayList example = new ArrayList<String>(); + example.add("Hello, World!"); + final String foo = example.get(0); + return foo.toLowerCase(); + } + + public void example2() { + ArrayList list = new ArrayList<String>(); + list.add("zero"); + list.add("one"); + list.add("two"); + for(int i = 0; i < list.size(); ++i) { + System.out.printf("%d: %s\n", i, list.get(i)); + } + } +} |