-2

My ArrayList is like this, but I get an error "integer number too large".

testNet.setTrainSet(new double[][] { 

                { 1555760766,0.18 },{ 1555760766,0.3 },                
               { 1555760766,0.6 }, { 1555760766,0.6},

                { 2076569012,0.45 }, { 2076569012,0.64},
                { 2076569012,0.78 }, { 2076569012,0.98 },                             
                {2076569012,0.98 } ,  { 3265731800,0.1 }, 

                });

what is the solution?

mndn
  • 73
  • 8

1 Answers1

1

Here the problem is that in java double literals end with a d if you didn't put d it will consider as an integer, hence integer no too large error will throw.

In this case you are missing d, so add d for the numbers which dont have a precision..

eg double no = 1555760766d;

Jobin
  • 5,610
  • 5
  • 38
  • 53