JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
Unit 7 Quiz
Exception Handling and Git
FTC Omega 9656 | Learn Code
Sign in to Google
to save your progress.
Learn more
* Indicates required question
What structure do you use to handle exceptions in Java?
*
1 point
try-catch
if statement
finally
while loop
True or false: All exceptions are classes.
*
1 point
True
False
What does the printStackTrace() method do?
*
1 point
Prints the default error output
Prints the line of code that caused the exception
Prints the name of the exception that was thrown
When does code inside of the finally block run?
*
1 point
When the try block runs without throwing any exceptions
When the try block runs AND at least 1 catch block runs
When more than 1 catch block runs
Always after the try-catch block(s) run
True or false: Use the throw keyword to declare that a method throws an exception.
*
1 point
True
False
True or false: You can use the new operator to create an Exception object.
*
1 point
True
False
Which of the following commands is used to move to a different folder?
*
1 point
mv
mvdir
mkdir
cd
Which of the following commands is used to list all files and directories? in the current directory?
*
1 point
ls
list
show
pwd
Which command(s) would you use to delete a directory that has files in it? Select all that apply.
*
1 point
rm -r
deldir
rmdir
del -dir
Required
True or false: Git and GitHub are the same thing.
*
1 point
True
False
How do you initialize a Git repository?
*
1 point
git start
git init
git create
git add
How do you commit a file?
*
1 point
git commit
git add
git save
git log
True or false: The git branch <branch> command creates a new branch and checks out the newly created branch.
*
1 point
True
False
True or false: When you merge a branch into another branch, a merge commit is created which automatically incorporates changes from both branches.
*
1 point
True
False
If you only wanted to view the state of the repository at a certain commit, what command would you use?
*
1 point
git restore
git checkout
git revert
git reset
What do you use to check the status of the repository?
*
1 point
git status
git log
git show
git reflog
What do you use to see commit history?
*
1 point
git status
git show
git log
git commit
True or false: Forking is when you make a copy of a repository on your own account.
*
1 point
True
False
What is a PR (when talking about GitHub)?
*
1 point
pull request
public relations
push request
What are PRs used for (on GitHub)?
*
1 point
To fork a repository
To merge changes into a repository
To submit a bug report on software
Submit
Clear form
Forms
This content is neither created nor endorsed by Google.
Report Abuse
Terms of Service
Privacy Policy
Help and feedback
Contact form owner
Help Forms improve
Report