click below
click below
Normal Size Small Size show me how
DataTypes Program
Questions based on DataType program done in class
Question | Answer |
---|---|
What is a data type? | Classification that determines how data is stored |
What is a string? | class provided by Java that provides the ability to program with words |
Name three naming rules | No spaces, no special characters except $, and must begin with a letter |
What key do you use to start a single line comment? | // |
Declare a String variable named cheese; | String cheese; |
What is a string literal? | characters(s) enclosed in double * quotation marks */ |
What is a assignment? | the processes of storing a value at a variable memory location using =(assignment operator)*/ |
What must match the class name? | Must match file name |
What is Syntax? | Grammer, structure, or order of the elements in a language statement. |
What is declaration? | Process of telling the compiler the name of a variable and the type of data to be stored in the memory location allocated to the variable. |
What are Primitive Data Types | 2 |
What is hard coding? | To use explicit rather than am symbolic name for something that is likely be changed at a later time |
What is camelBack notation? | The first letter is lowercase and for each subsequent word the first letter is capitalized |
What is a main method | A program begins by calling the main method and begins execution with the first line of code in the |
How many bits and bytes does it take to declare a integer variable? | 1 |
How many bits and bytes does it take to declare a real variable? | 1 |
What does a boolean data type require? | Requires single quotes. |
What are the rules for naming camelBack notation? | 1 |
What data type allows the storage of multiple characters enclosed in double quotes? | |
What is a primitive data type? | Most basic data types provided by a language |
what is a program block? | the coded enclosed between {} |
What is assignment? | 1 |
How many bits does it take to declare a boolean? | 1 bit |
the double data type allows what? | 1 |
The boolean data types allows what? | 1 |
What characters should be avoided? | throwaways |
What allows the storage of multiple characters enclosed in double quotes? | 1 |
Declaring a string size depends on what? | It depends on the Java Virtual Machine? |
Define Naming conventions | camelBack notation names are meaningful One-character variable names should be avoided |
What is the Basic syntax for declaration and assignment? | <data type> variableName= <value> |