That's pretty different to a dot import in Go. If the imports below gave youÂ
List list = singletonList(someobject) Then they would be comparable - the static imports are more comparable to Go's dot imports, but then in your next post you say that they're mainly used for constants, "although for some types of routines it is used to make the code read like a DSL." On Sun, 2018-12-02 at 00:04 -0600, robert engels wrote: > When you use > > import java.util.Collections; > import java.util.List; > > You are actually doing a dot import, so you can in the code just > refer to it as so > > List list = Collections.singletonList(someobject) > > otherwise you need to write the code as: > > java.util.List list = > java.util.Collections.singletonList(someobject); -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.