UPDATED ACTUAL Exam Questions and
CORRECT Answers
What is the difference between an absolute path and a relative path? - CORRECT
ANSWER - An absolute path starts at the root as an anchor while a relative path does not.
The path is RELATIVE to the present, start location.
What does PWD do? - CORRECT ANSWER - Print (or present) working directory (or
folder)
What does CD do? - CORRECT ANSWER - Changes directory
Describe GIT - CORRECT ANSWER - Git is a distributed version control system that
allows for saving checkpoints (like a video game), share code, compare past versions, allow for
parallel development, and know who made changes.
How do Github and Bitbucket differ from GIT? - CORRECT ANSWER - Github and
Bitbucket are like Google Drive. They host the code, not the software. GIT is the software.
Describe the technical relationship between Java and Javascript. - CORRECT ANSWER -
Trick question! There is no technical relationship between Java and Javascript though newer
versions of Java do include some elements of Javascript though.
What kind of code does the Javac read? What kind of code does it change that into? - CORRECT
ANSWER - Javac reads the source code (what developers write) and transform it into Byte
code.
What kind of code does the JVM read? What does it do with that code? - CORRECT
ANSWER - The JVM reads Byte ode and interprets it into machine code for a specific
platform (Linux, Mac, or Windows)
, Describe the process of going from source code to machine code. - CORRECT
ANSWER - The JAVAC reads the source code and changes it into Byte code. The Byte
code is then read by the machine specific JVM at run time which creates machine code that that
kind of machine (Linux, Windows, or Mac) can read.
What is the problem with using floats and doubles when the variable represents monetary
values? - CORRECT ANSWER - Floats and doubles have rounding errors.
What is casting? - CORRECT ANSWER - Casting is used to convert the value of one type
to another. Example: long x = 10
int y = int x;
What is narrowing in terms of casting? - CORRECT ANSWER - Going from a larger
variable to a smaller one.
Example: int smaller = (int) bigger;
What is widening in terms of casting? - CORRECT ANSWER - Also known as implicit
casting, this is going from a smaller variable to a larger variable.
Example: int smallerNum = 5
Long biggerNum = smallerNum;
Describe truncation. - CORRECT ANSWER - The right side of the
"=" is evaluated first and sometimes this causes loss of accuracy so in the case of x = 7;
y=3
double z = x/y, the answer would be 2 because x and y are ints and the value is truncated and
then handed over to z despite it being a double that could handle 2.5.
What does a method signature identify? How? - CORRECT ANSWER - Who can call it
(accessor), the return type (Ex: String), what to call it (name of method), and what the input takes
(parameters)