GoConqr has a new look! Let us know what you think.

Flashcards

Week 1 Lecture (quiz)

David Hinton Java 0017 English 10 cards

Cards in this deck (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

Information

Description
Java 0017 Flashcards on Week 1 Lecture (quiz), created by David Hinton on 07/09/2017.
Created by
David Hinton
Views
0
Rating

More on Variables, Constants and Data Types

Feedback

What is it about?

What do you think of the new look?

How do you like it?