# Big number « Number « Java Data Type Q&A

### 1. Sieve of Eratosthenes problem: handling really big numbers    stackoverflow.com

I'm solving Sphere's Online Judge Prime Generator using the Sieve of Eratosthenes. My code works for the test case provided. But.. as the problem clearly states:

The input ...

### 2. how to write own multiplication of big numbers?    stackoverflow.com

In my project I have to deal with multiplication of bignumbers ( greater then java.long ) stared in my own BigNumber class as int[]. Basically i need to implement something like ...

### 3. Grabbing the next biggest number    stackoverflow.com

I have this:

``````  int[] tal = {3, 8, 5, 8, 2, 3, 9, 12, 21};
int max=tal[0];
for(int i=0;i<tal.length;i++){
if(tal[i]>5){
...``````

### 4. Find the Number of "Big Steps" along a walking Trail    stackoverflow.com

We have an array of heights, representing the altitude along a walking trail. Given start/end indexes into the array, return the number of "big" steps for a walk starting at the ...

### 5. Project Euler, problem 3 fails for big numbers    stackoverflow.com

I have run into a weird issue for problem 3 of Project Euler. The program works for other numbers that are small, like 13195, but it throws this error when I ...

### 6. Find biggest 2 numbers    coderanch.com

Hi friends, Yesterday I have attended one interview , I got question like these, 3,4,5,67,1,67,233,466 How to find biggest of 2 numbers amoung these numbers . Should not use any sorting algorithm also they asked me to use any collection classes. Also how to find duplicate of these numbers Please any one help me to get solution for this. Thanks

### 7. Finding the biggest number using java    coderanch.com

public class SampleProgram { static int max = 0; /** * @param args */ public static void main(String[] args) { SampleProgram sample = new SampleProgram(); int[] list = {99,45,10,121,12,87,9,89,34}; int number = sample.findMaxNumber(list); System.out.println("Maximum Number is :"+number); } /** * @param myList * @return */ private int findMaxNumber(int[] myList){ max = myList[0]; for(int i=1;imax){ max = myList[i]; } } return ...

### 8. Isolating Digits in big numbers (mod ten)    forums.oracle.com

I was wondering how i isolate the digits. I figured i could mod 10 them all like this. import.javax.swing.*; public class LuhnAlg { public static void main (String[]args) { String input int sin; input = JOptionPane.showInputDialog ("Please type a nine digit social insurance number (SIN) with no spaces"); sin = Integer.parseint (input)

### 9. Dealing with big numbers    forums.oracle.com

I'm teaching myself Java and I'm having the issue that the book I'm working out of has me doing example problems that are out of range for their data type. The one I'm working on now is a credit card validation program, but 13 to 16 digit integers are too big even for long. Another program I'm supposed to do has ...

### 12. Big Numbers(literally)    forums.oracle.com

I've done quite a bit of searching for this on google and on the site and have come up with no results. (Bad searching maybe?) On a recent computer programming test I was asked to read numbers from a file and print them out into a large ascii sort of way. For instance 1 11 1 1 11111 22222 ...