CS 1410 Study Guide - Final Guide: Null Pointer, Machine Code

192 views3 pages

Document Summary

Use == for null (technically primitive, . equals() causes null pointer exception) Leads to problem decomposition, where complex problems are simplified. Algorithm - an unambiguous, step-by-step description to solve a problem. teach-cs1410@list. eng. utah. edu. Scanners - scans characters separated by white space. Retrieving: string token1 = scannername. next(); (retrieves moo) or int num = scannername. nextint(); Files are looked for in the project folder. Or: (declare w/ assigned values, but can"t use to assign values after declaration) Making scanner from file, that scans the file. Compiler takes source code (in java) turns it into machine code (java byte code). A constructor allocates memory for the object, initializes the object"s instance variables, and then returns a (new) reference to the object. Constructor has: same name as class, no return type, default constructor does not need to be coded. Arrays of objects (if not initialized) hold null references of those objects. Static variables are class variables, therefore all objects share the same copy of the variable.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers