Created
October 8, 2018 21:31
-
-
Save szeiger/ed122326db5c4fab0be781248b603563 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.collection.immutable.HashMap$; | |
import scala.collection.immutable.HashMap; | |
import scala.collection.immutable.Map; | |
import scala.collection.mutable.Builder; | |
import scala.Tuple2; | |
public class JavaCallingScalaHashMap { | |
public static void main( String[] args ) { | |
Map<String, Integer> hashMap = HashMap$.MODULE$.empty(); | |
Builder<Tuple2<String, Integer>, HashMap<String, Integer>> b = HashMap$.MODULE$.newBuilder(); | |
b.addOne(new Tuple2<>("foo", 42)); | |
Map<String, Integer> hashMap2 = b.result(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment