Commits

Tim Vernum committed f1cbd97

Add sample for effective final variable

Comments (0)

Files changed (1)

convert/source/java/samples/sample/WikiSamples.java

         Runnable runnable = () -> {
             System.out.println("Running!");
         };
-        Callable<String> callable = () -> "abc";
+        String str = "abc";
+        Callable<String> callable = () -> str;
         FileFilter filter = (file) -> file.getName().endsWith(".xml");
         javax.swing.event.ChangeListener listener = event -> { System.err.println("Event:" + event); };
         Comparator<? super String> cmp = (CharSequence a, CharSequence b) -> {