Gestalte GoConqr mit. Was sollen wir als Nächstes hinzufügen?

Karteikarten

Introduction to Computer Science 201 Midterm Flashcards

Carlos Guzman Valencia Englisch 5 Karten

Karten in diesem Stapel (5)

  1. 1Which keyword do we need to specify in order to access another class from another package?Import
  2. 2Explain the difference between a String variable and a String literal.String literals are hard coded text enclosed with double quotation marks, e.g: “Hello World”. A
    String variable is a variable that holds a string literal. E.g: String name = “Anson”;
    System.out.println(name) is different than System.out.println(“name”)
  3. 3Explain why you must declare every variable in Java before you can reference itBe
    cause the Java compiler won’t know what the undeclared variable is. It needs to check what
    it’s data type is.
  4. 4Explain what truncation is and when it occurs.Truncation is where the floating points of a numeric type are cut off from the number, and
    only the integer part remains. For example, 5/9 = 0.555
    555... but because 5 and 9 are both
    integers, the .55555... is truncated and the result leaves you with 0
  5. 5What is the result of 5/0? How about 5.0/0?5/0 will result in a run-time error somewhere in the program. 5.0/0 will result in infinity

Informationen

Beschreibung
Karteikarten am Introduction to Computer Science 201 Midterm Flashcards, erstellt von Carlos Guzman Valencia am 14/10/2018.
Aufrufe
2
Bewertung

Feedback

Worum geht es?

Was sollen wir als Nächstes hinzufügen?