Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

big integer input in java

import java.math.BigInteger;  
import java.util.*;  
public class ScannerNextBigIntegerExample1 {    
    public static void main(String args[]){    
          System.out.print("Enter BigInteger Number to check prime: ");;  
          Scanner in = new Scanner(System.in);  
        BigInteger n = in.nextBigInteger();  
        in.close();  
        System.out.println(n.isProbablePrime(1) ? "prime" : "not prime");  
      }    
}  
Comment

PREVIOUS NEXT
Code Example
Java :: toast.maketext error kotlin 
Java :: jdbc maven dependency 
Java :: the result o trim is ignored java 
Java :: how to add a keylistener to a jframe 
Java :: cors filter spring boot 
Java :: how to generate output in various colors in java 
Java :: how to delete character certain index in java 
Java :: separate string by comma java 
Java :: java button actionlistener 
Java :: datatypes in arduino 
Java :: how to refresh activity without intent in android 
Java :: convert set to list java 
Java :: primefaces custom validation 
Java :: circle line intersection java 
Java :: jframe button 
Java :: load a file from classpath spring boot 
Java :: char variable java 
Java :: print map in java 
Java :: add certificate to java truststore 
Java :: How to create an adjacency list representation of a graph, in Java? 
Java :: java string format 2 decimal places 
Java :: how to create a random number in java 
Java :: Caused by: java.lang.NoSuchMethodError: org.apache.logging.log4j.spi.LoggerContextFactory.isClassLoaderDependent()Z 
Java :: javafx object rectangle 
Java :: how to check grant permissions in android 
Java :: worldedit set random blocks 
Java :: convert java to kotlin online editor 
Java :: get hashmap into array 
Java :: java or symbol 
Java :: java convert integer to string 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =