GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Week 1 Lecture (quiz)

David Hinton Java 0017 Englisch 10 Karten

Karten in diesem Stapel (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

Informationen

Beschreibung
Java 0017 Karteikarten am Week 1 Lecture (quiz), erstellt von David Hinton am 07/09/2017.
Erstellt von
David Hinton
Aufrufe
0
Bewertung

Mehr zu Variables, Constants and Data Types

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck