1 / 8

Data Types, Data Structures and Constructs in Java

Data Types, Data Structures and Constructs in Java. Drew Bacha Chapter 2, 2.1.1-3. Primitives. Beyond Primitives. The difference between a primitive and a class is that a class, String, starts with a capital letter. length() is method that returns the current length of the string name.

helmut
Download Presentation

Data Types, Data Structures and Constructs in Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Types, Data Structures and Constructs in Java Drew Bacha Chapter 2, 2.1.1-3

  2. Primitives

  3. Beyond Primitives • The difference between a primitive and a class is that a class, String, starts with a capital letter. • length() is method that returns the current length of the string name.

  4. Comparison Conditions

  5. Increment and decrement operators

  6. Common backslash in a string, and Arithmetic operators

  7. Casting, Sequence, Nesting • Casting means converting from one data type to another. Placing the primitive type in front of the right hand side of an assignment. • Ex. int k = 450; • double x = k; // k gets converted to a double • A sequence of instructions is where statements or actions in an algorithm simply flow from one to the next. • Nesting occurs when one control variable(if and if else are control structures) is placed inside another.

  8. Standard methods

More Related