RUVIDEO
Поделитесь видео 🙏

3. Java Data Types Introduction.

📁 Обучение 👁️ 16 📅 05.12.2023

All numeric types have a maximum and minimum value they can represent. Only so many bytes are available—this limits numbers.
Classes, final ints. In Java the numeric classes, like Byte and Integer, have public final fields (constants). These tell us properties of the number types themselves.
Type, size, min and max. This program is repetitive (sorry about that) but it serves its purpose. It displays the TYPE code, the SIZE and the min and max values.
TYPE:
This returns a class reference. This matches the shortened type, like int for Integer.
SIZE:
This returns the numbers of bits in the type. There are 8 bits in a byte.
MIN_VALUE:
This is the smallest value the numeric class can represent. All the types except Char have sign bits.
MAX_VALUE:
This is the highest value possible in a type. For Double and Long, these are huge.

Sign bits. All the types above (except char) have a sign bit. This is different from other languages—in C# for example a byte is unsigned, and an sbyte is signed.
Char:
This type is equivalent in both Java and C#. It is equivalent to a short with no sign bit (an unsigned short or ushort).
Character

Loop boundaries. MAX_VALUE and MIN are helpful in loops. Sometimes you may want a high number—the maximum constant is convenient.

Byte. The byte uses 8 bits of storage. In Java the byte is a signed number, so it can be negative or positive. We can cast larger values to bytes, but they will overflow.

Short. This is a two-byte integral type. It has a sign bit, so it supports negative and positive numbers. We use short to save memory, and to improve compatibility with existing software.

Long. This is an 8-byte integral number type, twice the size of an int. This program creates a long from a value that cannot be stored in an int—it is too large.

Float. This is a floating-point, 4-byte number. A float is like a double but only has 4 bytes (a double has twice as many bytes).
With this type, we can store numbers with a decimal place. A float can be cast to a double without any special syntax. But we must be careful when converting from a double to a float.

Max, min values. Floats can store a wide range of values. But with floats we also find a "normal values" concept. A normal value is within a "balanced range" of values.

Double. A double is twice the size of a float. It is 8 bytes (which is equal to 64 bits). Doubles are used to store floating point values.
In Java, we use the Double class to access static methods and constants on a double. We can find useful constants like BYTES but also methods like isNaN to test for special double values.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «3. Java Data Types Introduction.», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.