Today's Flashcards
Jan. 12th, 2009 05:33 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Over the holidays I started reading the textbook and creating flashcards in Supermemo on my handheld. These are the ones that were discussed in the first class. Let me know if you know a better way to put the questions, assuming that's your kind of thing.
Start a multi-line comment with:
/**
Each line of a multi-line comment starts with:
*
End a multi-line comment with:
*/
boolean
defines a variable as true or false
char
defines a variable as a Unicode character
byte
defines a variable as an integer up to 1 byte
short
defines a variable as an integer up to 2 bytes
long
defines a variable as an integer up to 4 byte
long
defines a variable as an integer up to 8 byte
float
defines a variable as a floating point up to 4 bytes
double
defines a variable as a floating point up to 8 bytes
What characters are allowed in variable identifiers?
letters, digits, underscore
Are variable names case-sensitive?
Yes.
Can a variable identifier start with a number?
No.
What does every assignment statement end with?
;
Start a multi-line comment with:
/**
Each line of a multi-line comment starts with:
*
End a multi-line comment with:
*/
boolean
defines a variable as true or false
char
defines a variable as a Unicode character
byte
defines a variable as an integer up to 1 byte
short
defines a variable as an integer up to 2 bytes
long
defines a variable as an integer up to 4 byte
long
defines a variable as an integer up to 8 byte
float
defines a variable as a floating point up to 4 bytes
double
defines a variable as a floating point up to 8 bytes
What characters are allowed in variable identifiers?
letters, digits, underscore
Are variable names case-sensitive?
Yes.
Can a variable identifier start with a number?
No.
What does every assignment statement end with?
;
no subject
Date: 2009-01-13 02:01 pm (UTC)Oh, and the ; ends any kind of statement, not just assignments. Think of it like the end of the line in Python.
left out
Date: 2009-01-16 05:34 am (UTC)also add int and it's byte size, which I blieve is the same as long... just another way to declare a long.