
The difference between long int in java
Both long and int in java are integers, why do they need to be subdivided? What about the two data types long and int? This is because they represent different sizes. The specific differences are as follows:
1. Difference 1
16-bit system: long is 4 bytes, int is 2 bytes
32-bit system : long is 4 bytes, int is 4 bytes
64-bit system: long is 8 bytes, int is 4 bytes
2. Difference 2
The difference between long and int is that their occupancy lengths are different. Long is 64 bits, while int is 32 bits.
3, Difference 3
int: 32-bit integer -2,147,483,648——2,147,483,647, generally integers are enough
long: 64-bit integer -9,223,372,036,854,775,808——9,223,372,036,854,775,807, generally not needed
Supplement :
Java data types are divided into two types:
1. Basic types: long, int, byte, float, double, char
2. Object type (Class): Long, Integer, Byte, Float, Double, Char, String, all other classes provided by java or created by yourself.
Long is also called the packaging class of long. The same goes for Byte and Float. Generally, the first letter of the name of the package class is the capital of the numerical name.
php Chinese website, a large number of free Java introductory tutorials, welcome to learn online!
The above is the detailed content of The difference between java long int. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version
Recommended: Win version, supports code prompts!

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version





