0% found this document useful (0 votes)
12 views

Summary of Variables (The Java™ Tutorials - Learning The Java Language - Language Basics)

Uploaded by

justininokiumu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Summary of Variables (The Java™ Tutorials - Learning The Java Language - Language Basics)

Uploaded by

justininokiumu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Documentation

Search
The Java™ Tutorials Hide TOC

Language Basics
Variables « Previous • Trail • Next » Home Page > Learning the Java Language > Language Basics
Primitive Data Types
Arrays
The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no
Summary of Variables
longer available.
Questions and Exercises
See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
Operators
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.
Assignment, Arithmetic,
and Unary Operators
Equality, Relational, and Summary of Variables
Conditional Operators
Bitwise and Bit Shift The Java programming language uses both "fields" and "variables" as part of its terminology. Instance variables (non-static fields) are unique to each instance of a class. Class variables (static
Operators fields) are fields declared with the static modifier; there is exactly one copy of a class variable, regardless of how many times the class has been instantiated. Local variables store temporary
Summary of Operators state inside a method. Parameters are variables that provide extra information to a method; both local variables and parameters are always classified as "variables" (not "fields"). When naming
Questions and Exercises your fields or variables, there are rules and conventions that you should (or must) follow.
Expressions, Statements,
and Blocks The eight primitive data types are: byte, short, int, long, float, double, boolean, and char. The java.lang.String class represents character strings. The compiler will assign a reasonable
Questions and Exercises default value for fields of the above types; for local variables, a default value is never assigned. A literal is the source code representation of a fixed value. An array is a container object that holds
Control Flow Statements a fixed number of values of a single type. The length of an array is established when the array is created. After creation, its length is fixed.
The if-then and if-then-
else Statements « Previous • Trail • Next »
The switch Statement
The while and do-while
Statements
The for Statement
Branching Statements
Summary of Control
Flow Statements
Questions and Exercises

About Oracle | Contact Us | Legal Notices | Terms of Use | Your Privacy Rights

Copyright © 1995, 2022 Oracle and/or its affiliates. All rights reserved.
Préférences en matière de cookies | Ad Choices

You might also like