how to keep a string in class file and access it in scala?

  Kiến thức lập trình

I am keeping one string value in a class file. I want to get this string in another scala main function. How do i get the string abc in main scala code.

package integration.utils


object schemaStructure  {

  class schemaStruct {

    def schemaJson: String =
      """
                  map<
                    string,
                    struct<
                        path:string,
                        type:string,
                        optional:string,
                        defaultValue:string
                    >
                  >
                """

  }
}

LEAVE A COMMENT