Computer Programming Exam 2

All Variables Must be Declared before they are used
True
False
All strings end with a null zero inside memory
True
False
Variable Names may begin with a number
True
False
In Java 5/2 =
2
2.5
3
None of the above
In Java the % refers to
Percentages
Modulus operator
Division
Data storage
The method toLowerCase() changes all lowercase letters to uppercase and all uppercase letters to lowercase
True
False
Variables that describe the data stored at that particular memory location are called
Identifiers
Constant variables
Mnemonic variables
Floating point variables
Array indexing always starts with the number
0
1
2
3
The following statement is valid : double Price = 7,450.98
True
False
In Java 12 % 5 =
1
2
3
4
The method IndexOf will allow you to search for the location of a comma
True
False
Mathematicians and computers interpret the equal (=) sign in the same way
True
False
A character variable may contain up to seven letters
True
False
When a datatype must contain decimal numbers, assign the type
Int
Char
Double
Long int
Variables that are declared, but not initialized, contain
Blank spaces
Zero
"garbage" values
Nothing- they are empty
A variable is given a value through
Osmosis
An assignment operator
The import statement
The public class declarations
The method length() will return an integer that represents the length of a string value
True
False
The name of a variable is known as
Identifier
Constant
Data type
Base
What is the output of the following program ? Public static void main(String ags[]){ String a="abc"; String b=new String("abc"); System.out.println(a.equals(b)); System.out.println(a==b); }
False, false
True, false
False, true
True, true
Public static void main(String ags[]){ String a="abc"; String b="abc"; System.out.println(a.equals(b)); System.out.println(a==b); }
False, false
False, true
True, false
True, true
{"name":"Computer Programming Exam 2", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"All Variables Must be Declared before they are used, All strings end with a null zero inside memory, Variable Names may begin with a number","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker