CSE 5J Lecture Notes - Lecture 5: Ellipse, Boolean Expression

35 views4 pages
20 Mar 2018
School
Course
Professor

Document Summary

Cmps 5j - lecture #5 - data types, relational operators, and if statements. 31 bits to represent the number and 1 bit to represent the sign, (positive or to 2. Example 1: whole number data types int y = 3; long xval = 10; We generally use int for all our whole numbers. Represents numbers with a decimal place using 64 bits. Represents numbers with a decimal place using 32 bits. Example 2: decimal data types double pi_condensed = 3. 14; You must use single quotes when using char. Only one character can be between the quotes; otherwise you get an error. The character in between the quotes is case sensitive. Check out an ascii table as each character corresponds to an ascii value. Example 3: character data type char grade = "a" Java will convert int to double implicitly but the opposite is not true.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents