How to define a parameterless constructor in Scala -


This question is so stupid ... anyway, I did not get the right information, because every scala-constructor example class I less Work with less than one parameter.

I want to translate this class for Java from Scala:

  increases public class SubscriptionConverter converter {publics SubscriptionConverter () {reference CTX = new initial concerts () ; User EJB User EJB = (User EJB) CTX. Lookup ("Java: Global / Sybernews / User EJB"); } (...)}  

So I have only the parameters with parameters I messed with this () with Scala (), but I like a later version Could not find the same example. How do I write in Scala?

Any statement declared at the class level is executed as part of the default constructor, Something needs to be done:

  class grants converter converter increases {val ctx = new InitialContext val userEJB = ctx.lookup ("java: global / teachernews / UserEJB") (.. ..) }  

Comments