Hi All,

package ab.c;
class package1{
def max(x:Int,y:Int){
if(x>y)
println(x)
else
println(y)
}
}


import ab.c.package1;
class pack1main {
def main(args:Array[String]):Unit={
val  n= new package1();
n.max(5,6);
}
}

Now whenever i execute this program every thing gets compiled but i get an
error pac1main.main not static
javap -s pack1main

public class pack1main extends java.lang.Object implements
scala.ScalaObject{
public pack1main();
  Signature: ()V
public void main(java.lang.String[]);
  Signature: ([Ljava/lang/String;)V
public int $tag()   throws java.rmi.RemoteException;
  Signature: ()I
}
 So the main is not static here....Any pointers??


[Non-text portions of this message have been removed]

Reply via email to