It is program to find the largest prme factor of any number.
// Program to get the largest prime factor of a number
import java.util.*;
class factor{
    ArrayList<Long> a;
    public void large(long n){
        for(long i = 1; i <= n; i++){
            if (n % i == 0){
                a.add(i);
            }   
         }
        System.out.println(Collections.max(a));
   }
}
class test{
     public static void main(String[] args){
         factor g = new factor();
         g.large(13195);
     }
}
 
     
    