CISC 124 Lecture Notes - Lecture 3: Java Virtual Machine, Java Bytecode, High-Level Programming Language

69 views3 pages

Document Summary

Interpreter/executer: platform dependent, advantages, fast, protected, easy to exchange, disadvantages, needs jvm installed. Java program structure: every java program is an object, class, modifier (public, private) keyword (class) name (world) , method heading, modifiers (public, static) return-type (void) name (main) arguments. Java translation: source code = classname. java, compiled by java compiler, low-level bytecode = classname. class, executed by jvm. Lecture 4: variables and assignments: semicolons everywhere, brackets instead of indentation, still indent for program style and reader understanding, declare all variables with type, ex. Int x = 0, y =1: static typing, type of variable known at compiler time, not runtime, compiler allocates appropriate memory space based on, type checking at compile time, data types in java data type, primitive, boolean, character. Integer: byte, short, int, long, floating-point numbers, float, double, non-primitive, string, array, integers. Int i = 2. 9 error: double d = 2 no compiler error, explicit type conversion. Int i = (int) 2. 9: opposite direction, returns 2, returns 3.

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
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents