¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

Week 1 Lecture (quiz)

David Hinton Java 0017 Inglés 10 fichas

Fichas del conjunto (10)

  1. 1Declarationset type creates a variable (allocates space in memory)
    int x ;
    int x = 5;
    {int x} is the declaration
  2. 2Initializationassigns an initial value
    int x = 5
    The 5 is the initialization
  3. 3Assigning a value'='
    the = sign assigns values
  4. 4Primitive Data TypesByte
    Short
    Int
    Long
    Char
    Float
    Double
    Boolean
  5. 5How do we define Constants?final plus All Caps
    final int QUARTAR_VALUE = 0.25
    final float PI = 3.14
  6. 6Typecastingdouble saleTotal = 175.05;
    final double PA_SALES_TAX = 0.07;
    double balance = salesTotal * PA_SALES_TAX;
    int dollars = (int) balance;
  7. 7String VariablesString name = "Harry"
    "Harry" is a string literal
  8. 8how do you find the lenght of a String?firstName.length();
    String firstName = "Harry";
    int n = firstName.length();
  9. 9escape sequence\t
    \n
    \'
    \"
  10. 10String => Numbersint x = Integer.parseInt("5");
    Double, Float, Byte

Información

Descripción
Java 0017 Fichas sobre Week 1 Lecture (quiz), creado por David Hinton el 07/09/2017.
Creado por
David Hinton
Visitas
0
Valoración

Más sobre Variables, Constants and Data Types

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?