package object playground { // staticmethod to be imported into class def getName() = "Iphone 6 (from helper method)"
// align to another object's method def nameFromPackageObject() = JasonPhone.name() }
package jason.program
// this line import classes & object under jason.playground (not recurisly) import jason.playground._;
// this line import"members" under jason.playground.JasonPhone // ~ importstaticinJava import jason.playground.JasonPhone._;
/** * Created by Jason on 1/20/16. */ objectMain { def main(args: Array[String]): Unit = { println("I am using: " + JasonPhone.name()) // this is declared inJasonPhone.scala println("I am using: " + nameFromPackageObject()); // this is declared in package.scala println("I am using: " + name()); // this is a short cut withstaticimport } }