Check out example codes for "biginteger in java". It will help you in understanding the concepts better.

Code Example 1

// Java program to find large factorials using BigInteger
import java.math.BigInteger;
import java.util.Scanner;

public class Example
{
// Returns Factorial of N
static BigInteger factorial(int N)
{
// Initialize result
BigInteger f = new BigInteger("1"); // Or BigInteger.ONE

// Multiply f with 2, 3, ...N
for (int i = 2; i <= N; i++)
f = f.multiply(BigInteger.valueOf(i));

return f;
}

// Driver method
public static void main(String args[]) throws Exception
{
int N = 20;
System.out.println(factorial(N));
}
}

Code Example 2

import java.math.BigInteger;
BigInteger f = new BigInteger("1");

Code Example 3

import java.math.BigInteger;

Code Example 4

public class ReplaceAllExample{
public static void main(String args[]){
String s1="Google is a very good website";
String replaceString=s1.replaceAll("a","e");//replaces all occurrences of "a" to "e"
System.out.println(replaceString);
}}

Code Example 5

public static void arraycopy(Object source_arr, int sourcePos,
Object dest_arr, int destPos, int len)
Parameters :
source_arr : array to be copied from
sourcePos : starting position in source array from where to copy
dest_arr : array to be copied in
destPos : starting position in destination array, where to copy in
len : total no. of components to be copied.

Learn ReactJs, React Native from akashmittal.com