1. Who invented the general purpose digital computer?
2. Who was the inventor’s assistant, sometimes considered to have been the computer programmer?
Ada Augusta Bryon
List all of the primitive types of the Java computer language.
\Byte, short, int, long, float, double, char, boolean
What is a portable computer program?
portable program is one that will run on any computer
that supports that language, with no change or with few changes.
iX = 9 % 5 would mean 5/ 9 and its remainder is the answer equaling 4, (goes in the box) % (outside the box)
iX = 5 % 9 would mean 9/5 and since it won’t fit the answer would be zero yet remainder of 5
iX = 0 % 5 would mean 5/0 and since it equals zero 5 times zero equals zero and 0 – 0 is zero
iX = 5 % 0 doesn’t make sense, how can zero divide to 5, that means that it would be an error
Error would read like , “Error: Can’t use % followed by zero”
Another thing is that when the equation is complicated such as the following:
iX = 7 -3 + 14 / 5 * 2 – 0.0; then it can’t be done since there is a 0.0 and this
isn’t a double variable on the left
Remember that on double variables there are like the following: 0.0
This class doesn’t have any remainders also just the straight answer
If the number 9/5.0 is like this, it would want the exact amount which would be 1.8
In this section they will ask you about the invalid and valid types….
First off, if its like
, this would be invalid because it is a RESERVED KEYWORD
is valid because its all right
is invalid because it starts with a number
; is valid but remember that $ is not so great because it would be poor practice
int LGL MOV
; is bad because it has a embedded blank
Row, row, row, your boat
System.out.println(“, row, your boat”);
\n means a new line
Remember on Strings that 0 is a number for example on the following string….
String str5 = “Election returns”;
char cc = str5.charAt(4);
this would be ‘t’ since it is the 4
character after zero
Below this remember that you pick the letters that are within the range
from the letter
| N you count to 4 then go to 7 and you stop right before e so the answer is
String str6 = “Newspaper column”;
String str7 = str6.substring(4, 7);
There would be a question concerning writing two Java statements that would read
A value type int into the int variable, look below at dataVal, when you use the scanner class
(such as one after you write a promt for println) This code would declare the scanner object and then use it
Scanner scan = new Scanner(System.in);
dataVal = scan.nextin();
Another question concerns the int variables that place iA and doubles that would ask to to a
Prompt question but link it with a number
The Value of iA
The Value of dB