Skip to content

Implicit type conversion via static #valueOf method #4

Closed
@amelentev

Description

@amelentev

For be able to write

BigInteger a = 123

instead of

BigInteger a = BigInteger.valueOf(123)

Scala equivalent to:

implicit def intToBigInteger(x: Int) = BigInteger.valueOf(x)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions