Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
26 views

Lesson 2

This document discusses three variable types - String, int, and double - providing sample code for each and explaining how to declare and initialize variables of these types. It also covers rules for variable names, what names are legal and illegal, and common naming conventions.

Uploaded by

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

Lesson 2

This document discusses three variable types - String, int, and double - providing sample code for each and explaining how to declare and initialize variables of these types. It also covers rules for variable names, what names are legal and illegal, and common naming conventions.

Uploaded by

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

Lesson 2..

Variable Types (String, int, double)


Three variable types:

String
Sample code:

int
Sample code:

double
Sample code:

Declaring and initializing:

double

two

declaring x

initializing x

two

Whats legal and whats not:

Rules for variable names:

Legal names

Variable naming conventions

double and

Illegal names

You might also like