FIT1051 Chapter Notes - Chapter 3: Java Class Library, Operand, String Literal

86 views4 pages
Week 3
Thursday, 8 March 2018
4:03 PM
Method code
Without data there is very little point to programming. Data values are stored in memory and
addressed by variables or they appear in program code as literals. All data in Java has a data type.
Data values are assigned to variables using assignment statements but only after they have been
properly declared using declaration statements.
Terminology
An expression in Java is the same as an expression in mathematics: a valid combination of variables,
literals, constants, operators and method calls that evaluate to a single value. The operators
combine the terms of the expression to get this single value.
Example - Variables, literals, declaration and assignment statements
Void - means the data does not return a value/has no output data
Parameters - data item values
Syntax templates allow all possible valid syntaxes for a Java statement to be specified without
enumerating each specific possibility. (In many cases it would be an infinite number)
Variable Declaration and Initialisation
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

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

Already have an account? Log in

Document Summary

Without data there is very little point to programming. Data values are stored in memory and addressed by variables or they appear in program code as literals. All data in java has a data type. Data values are assigned to variables using assignment statements but only after they have been properly declared using declaration statements. An expression in java is the same as an expression in mathematics: a valid combination of variables, literals, constants, operators and method calls that evaluate to a single value. The operators combine the terms of the expression to get this single value. Example - variables, literals, declaration and assignment statements. Void - means the data does not return a value/has no output data. Syntax templates allow all possible valid syntaxes for a java statement to be specified without enumerating each specific possibility. (in many cases it would be an infinite number) Variables do not have to be initialised with a value at their declaration.

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