How to declare long variable in java
Answers
Answered by
1
Answer:
❣️☺️HEY MATE ☺️❣️
HERE IS YOUR ANSWER ☺️ ☺️
Java String is created by using a keyword “new”. For example: String s=new String(“Welcome”); It creates two objects (in String pool and in heap) and one reference variable where the variable 's' will refer to the object in the heap.
❣️☺️ HOPE THIS WILL HELP YOU ☺️ ❣️
Answered by
0
1. Long data type is a 64-bit signed two's complement integer.
2. Minimum value is -9,223,372,036,854,775,808(-2^63)
3. Maximum value is 9,223,372,036,854,775,807 (inclusive)(2^63 -1)
4. This type is used when a wider range than int is needed.
5. Default value is 0L.
Example: long a = 100000L, long b = -200000L
Similar questions