title: Scala import class in same folder
body: <p>I am a beginner in Scala coming from Java background.
  I have two singleton object definition in two files as below.</p>
  
  <p>LongLines.scala</p>
  
  <pre><code>import scala.io.Source
  
  object LongLines {
  
    def processFile(filename: String, width: Int) {
      val source = Source.fromFile(filename)
      for (line &lt;- source.getLines)
        processLine(filename, width, line)
    }
  
    private def processLine(filename: String,
        width: Int, line: String) {
  
      if (line.length &gt; width)
        println(filename +": "+ line.trim)
    }
  }
  </code></pre>
  
  <p>FindLongLines.scala</p>
  
  <pre><code>object FindLongLines {
  def main(args: Array[String]) {
    val width = args(0).toInt
    for (arg &lt;- args.drop(1))
      LongLines.processFile(arg, width)
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I have first compiled LongLines.scala with the below command</p>
  
  <pre><code>[root@vm test_longlines]# scalac LongLines.scala 
  [root@vm test_longlines]# ls
  FindLongLines.scala  LongLines.class  LongLines$.class  LongLines.scala
  </code></pre>
  
  <p>Now, When I try to run with the below command I am getting cannot find symbol for 'LongLines'.</p>
  
  <pre><code>[root@vijayvm test_longlines]# scala -cp . FindLongLines.scala 10 LongLines.scala 
  /home/scala/dev/test_longlines/FindLongLines.scala:5: error: not found: value LongLines
      LongLines.processFile(arg, width)
      ^
  </code></pre>
  
  <p>one error found</p>
  
  <p>Should I gave to import LongLines in FindLongLines.scala ? Both are in the same folder but I have used package.</p>