0

是否可以在 scala 模板中编写 java 代码。如果是,请提供任何示例代码

  @while(@resultSet.next()) {
                   println("Mani");
                 String name=@resultSet.getString("name");
                Int  in=@resultSet.getInt("id");
                 println("Name:"+name)
                 print( name + ", " + in);

                  }
4

1 回答 1

1

As Jesper says here: https://stackoverflow.com/a/6357926/2935464 you will be able to access your regular Java classes and objects in Scala as long as you use the Scala syntax.

于 2013-10-31T09:14:47.490 回答