Scala从扩展java类的基类调用super

时间:2015-07-05 15:25:38

标签: java scala constructor base-class

Scala类继承JFrame类

class App extends JFrame {
  public App {
    //how to call this super method
    super("Hello world");
  }
}

1 个答案:

答案 0 :(得分:1)

正确的语法是:

class App extends JFrame("Hello world") {
  // your code
}