Is it possible to call a main method in one object from a main method in another? I have the following classes and was wondering how to call two separate main methods within one program run:
object MongoUpload {
def main(args: Array[String]): Unit = {
.. upload to Mongo ..
// Want to upload to Oracle here
}
}
object OracleUpload {
def main(args: Array[String]): Unit = {
.. upload to Oracle
}
}
Does anything make main unique among methods? Can I just call one from another?