0% found this document useful (0 votes)
20 views2 pages

Variable Types

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-308024418
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

Variable Types

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-308024418
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
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