What packages does 1) Java and 2) Groovy automatically import?

后端 未结 3 1459
悲&欢浪女
悲&欢浪女 2021-02-18 23:55

Having programmed in Groovy quite a bit I know classes in certain packages are automatically imported. What\'s the scoop for 1) Java and 2) Groovy? Is there a definitive list of

3条回答
  •  时光取名叫无心
    2021-02-19 00:06

    According to The Groovy programming language - Program structure

    Groovy by default imports these classes for you. There are six packages that groovy imports for you, they are:

    import java.lang.*
    import java.util.*
    import java.io.*
    import java.net.*
    import groovy.lang.*
    import groovy.util.*
    import java.math.BigInteger
    import java.math.BigDecimal
    

提交回复
热议问题