CSCI 1006 Lecture Notes - Lecture 5: Camel Case, Escape Character

15 views3 pages
Calculating range:
Minimum is (2(number of bits 1)).
Maximum is 2(number of bits 1) 1.
A bit is a single 1 or 0.
A byte is composed of 8 bits.
Java Programs
Java programs have reserved, key words.
These are terms that are part of the Java language.
They are not external.
For example: public, import, variable types.
Variables are used to refer to a piece of memory with a value.
Every variable must have a type.
When you type “<type> <variable>”, this is known as declaring the variable.
A variable always refers to the same location in memory, and thus has the
same value.
Names:
No spaces.
Reserved words cannot be used as variables.
Letters and numbers can be used.
Underscores and caps can be used.
Camel case is used in names → new words have capitals but no spaces,
likeThis.
Class names also follow conventions.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

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

Already have an account? Log in

Document Summary

Minimum is (2(number of bits 1)). Maximum is 2(number of bits 1) 1. A bit is a single 1 or 0. A byte is composed of 8 bits. These are terms that are part of the java language. Variables are used to refer to a piece of memory with a value. When you type , this is known as declaring the variable. A variable always refers to the same location in memory, and thus has the same value. Reserved words cannot be used as variables. Camel case is used in names new words have capitals but no spaces, likethis. They can be used as a types. Literals are denoted by " on both sides. A variable, like pi, can be fixed. If you add literals, you will get their corresponding values. "a" + 3 adds 3 to the numerical equivalent of a. A + 3 simply a 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
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