ART 111 Lecture Notes - Lecture 1: Local Variable, Access Modifiers, Static Variable

86 views4 pages
11 Mar 2018
School
Department
Course
Professor

Document Summary

A variable provides us with named storage that our programs can manipulate. Java has a specific type, which determines the size and layout of the variable"s memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. You must declare all variables before they can be used. The basic form of a variable declaration is shown here: data type variable [ = value][, variable [= value] ] ; Here data type is one of java"s datatypes and variable is the name of the variable. To declare more than one variable of the specified type, you can use a comma-separated list. This chapter will explain various variable types available in java language. There are three kinds of variables in java: Local variables are declared in methods, constructors, or blocks.

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

Related Questions