-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
8u131
-
x86
-
other
FULL PRODUCT VERSION :
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 10
A DESCRIPTION OF THE PROBLEM :
Maximum and the minimum value of the long data type is displaying as an error.
1. create a variable data type as long
2. give the maximum or minimum value of long data type (2^63-1)
eg: maximum = 9223372036854775807
minimum = -9223372036854775808
3.print the program.
4.verify the error
public class DataTypes{
public static void main(String args[]){
long lMaximum = 9223372036854775807;
System.out.println("Maximum value=" +lMaximum);
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. create a variable data type as long
2. give the maximum or minimum value of long data type
eg: maximum = 9223372036854775807
minimum = -9223372036854775808
3.print the program.
4.verify the error
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the maximum and the minimum value should display
ACTUAL -
Displaying an error
ERROR MESSAGES/STACK TRACES THAT OCCUR :
DataTypes.java:16: error: integer number too large: 9223372036854775807
long lMaximum = 9223372036854775807;
^
1 error
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Windows 10
A DESCRIPTION OF THE PROBLEM :
Maximum and the minimum value of the long data type is displaying as an error.
1. create a variable data type as long
2. give the maximum or minimum value of long data type (2^63-1)
eg: maximum = 9223372036854775807
minimum = -9223372036854775808
3.print the program.
4.verify the error
public class DataTypes{
public static void main(String args[]){
long lMaximum = 9223372036854775807;
System.out.println("Maximum value=" +lMaximum);
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. create a variable data type as long
2. give the maximum or minimum value of long data type
eg: maximum = 9223372036854775807
minimum = -9223372036854775808
3.print the program.
4.verify the error
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the maximum and the minimum value should display
ACTUAL -
Displaying an error
ERROR MESSAGES/STACK TRACES THAT OCCUR :
DataTypes.java:16: error: integer number too large: 9223372036854775807
long lMaximum = 9223372036854775807;
^
1 error
REPRODUCIBILITY :
This bug can be reproduced always.