






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An overview of the fundamental concepts in java programming, including identifiers, primitive types, operations, java strings, java naming conventions, if statements, loops, classes, and keywords. It covers topics such as syntax rules for identifiers, different data types, order of precedence for operators, string manipulation, java naming conventions, conditional statements, and loop structures.
Typology: Slides
1 / 12
This page cannot be seen from the preview
Don't miss anything!
Compile code (convert from Java to computer code)
Run code
boolean - True or false char - (character) A letter or number int - (integer) Whole numbers long - (long integers) Larger whole numbers float - Decimal numbers double - Larger decimal numbers
doubles are approximations ints are exact but have a more limited rangeDocsity.com
Order of precedence (higher operations first): -, +, ++, -- and! (unary operators) *, / and % (binary operators)
Assignment operators: ++, --, +=, -=, *=, /=, =
Conventions for identifiers:
Class - Start with uppercase (e.g. StringBuffer)
Object - Start with lowercase (noun) (e.g. homeworkOneGrade)
Method - Start with lowercase (verb) (e.g. isEmpty() ) Docsity.com
if (boolean expression) { // code } else { // more code }
|| is the OR operations && is the AND operations
Logical operations:
(greater than) == (equals) < (less than) = (greater than or equal to) != (not equal to) <= (less than or equal to)
Classes are a way of organizing and manipulating (methods) similar data (variables)
Methods can take in additional variables as arguments
If a value is returned, then this value will replace the method where it was called Docsity.com
Where a variable is visible/usable is called that variable's scope
Overloading is when two (or more) methods have the same identifier (name), but do different actions
Constructors are special methods that are always run when you make a class object
Classes are stored as a reference in memoryDocsity.com