Learn Java Programming - Primitive Numeric Type Conversions Tutorial

Pubblicato il: 11 July 2015
sul canale di: Daniel Ross
1,587
15

This tutorial will focus on what happens when we assign the values of variables of different data types to each other. In order to simply assign the value of a variable of one data type to the variable of another data type the receiving variable needs to be compatible. To be compatible, generally the variable to the left of the assignment operator (=) must be the same size or larger than the variable on the right. The char, float, and double data type variables do not adhere to this generalization though.
The following code will detail the process of what is technically called widening primitive conversions. There are 19 valid conversions as you will see in the source code. My tutorial on Primitive Numeric Type Casting will discuss how you can assign values to incompatible data types.


In questa pagina del sito puoi guardare il video online Learn Java Programming - Primitive Numeric Type Conversions Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Daniel Ross 11 July 2015, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,587 volte e gli è piaciuto 15 spettatori. Buona visione!