FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

swift-java/Samples/JavaProbablyPrime at docs-comments-style · swiftlang/swift-java · GitHub

Latest commit

 

History

History
 
 

JavaKit Example: Using Java APIs from Swift

This package contains an example program that uses Java's java.math.BigInteger from Swift to determine whether a given number is probably prime. You can try it out with your own very big number:

swift run JavaProbablyPrime <very big number>

The package itself demonstrates how to:

  • Use the Java2Swift build tool plugin to wrap the java.math.BigInteger type in Swift.
  • Create an instance of BigInteger in Swift and use its isProbablyPrime.

Back | FazBrowse Home | New Git URL