java - Possible Lossy conversion from long to int -
I want to enter a When I'm trying to do this Netbeans shows me an error in this line: "Long probable potential loss conversion" here is my code: - then the maximum array size (approx.) To get around this mess and quick int and other
long ex: 1 I'm 100,000,000, and now I want to make an array of 1000000000 size. And then on each index of array, store int well, ex:
arr [100000000] = 4 .
arr = new long [y + 1] `and` arr [J] = 0`
public Fixed zero master throws IOException (string [] args {BufferedReader s = new BufferedReader (New InputStreamReader (System.in)); String [] xe = s.readLine (). the division (""); Int x = integer.center (xe [0]); Long y = long.moreover (xi [1]); Long [] arr; Arr = new tall [y + 1]; For (long jm = 0; j and lt; = y; j ++) arr [j] = 4; The ARA Index is an integer in Java and the compiler will advise you.
integer.mx_arran Is. For large arrays, you should use the arrialists.
arr = new long [(int) y + 1];
Comments
Post a Comment