From 3f8d31656bf748802e699c4b810bf1db1cb0f6d6 Mon Sep 17 00:00:00 2001 From: Aingeru Date: Sun, 12 May 2019 09:12:56 +0200 Subject: [PATCH] Code comments translated (#21909) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Code comments translated Traducidos los comentarios del código de los ejemplos. * Update index.md --- guide/spanish/java/variables/index.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/guide/spanish/java/variables/index.md b/guide/spanish/java/variables/index.md index 3e0b6dfac6d..6f9bd9b1fc0 100644 --- a/guide/spanish/java/variables/index.md +++ b/guide/spanish/java/variables/index.md @@ -17,32 +17,30 @@ Es posible que haya notado que el **tipo de envoltorio** consiste en tipos escri Normalmente, puede _declarar_ (es decir, crear) variables según la siguiente sintaxis: < _tipo de datos_ > ; ```java -// Primitive Data Type +// Tipo de dato primitivo int i; - // Reference Data Type + // Referencia al tipo de dato Float myFloat; ``` Puede _asignar_ un valor a la variable de forma simultánea cuando lo declara (lo que se denomina _inicialización_ ), o en cualquier lugar del código después de haberlo declarado. El símbolo **\=** se utiliza para el mismo. ```java -// Initialise the variable of Primitive Data Type 'int' to store the value 10 + // Inicializa la variable primitiva del tipo 'int' para almacenar el valor 10 int i = 10; double amount = 10.0; boolean isOpen = false; char c = 'a'; // Note the single quotes - //Variables can also be declared in one statement, and assigned values later. + // Las variables también pueden declararse en una sentencia, y asignarse valores más adelante. int j; j = 10; - // initiates an Float object with value 1.0 - // variable myFloat now points to the object + // Inicializar un objeto de tipo Float con el valor "1.0" y hacemos que la variable 'myFloat' lo referencie Float myFloat = new Float(1.0); - //Bytes are one of types in Java and can be - //represented with this code + // Los Byte son uno de los tipos de Java y pueden ser representados mediante este código int byteValue = 0B101; byte anotherByte = (byte)0b00100001; ``` @@ -52,4 +50,4 @@ Como se desprende del ejemplo anterior, las variables del tipo Primitivo se comp # Otros recursos * [Tipos de datos](https://guide.freecodecamp.org/java/data-types) -* [Clases y objetos](https://guide.freecodecamp.org/java/classes-and-objects) \ No newline at end of file +* [Clases y objetos](https://guide.freecodecamp.org/java/classes-and-objects)