CS 0401 Lecture 2: Java Fundamentals Recap

20 views2 pages
School
Course
Date: 2017-01-10
LECTURE 2
1. LITERALS
A. Anything that is a constant value
i. Can be string num
2. STATEMENT
A. Units of declaration or execution
i. Ex int weekDays = 7;
B. Initializer statement can be pooled together by comma
C. Method Call = System.out.printlnAnswer is +var
3. VARIABLES & DATA TYPES
A. Primitive types
i. Byte = 8 bit signed integer (minimum val = -128, max = 127)
1. Ex 00000000
ii. Int = 32 bit (min = -2147483648
iii. Long= 64 bit , an extended integer
iv. Float = 32 bit
v. Double = 64 bit extended float
vi. Boolean = true or false
vii. Char= 16 bit Unicode character
B. Casting
i. Converting one primitive type to another
C. Reference types
i. Reference to where custom object is stored
ii. Saves location of the object not the object itself
4. MATH CLASS WITHIN JAVA
A. Math.PI is defined as a double
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

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