GIT/GitHub + CLI

Exceptions
File I/O
Inheritance Deep Dive
Asymptotic Notation
100

This command initializes a new Git repository in the current directory

What is git init?

100

In a try-catch block, this keyword is used to enclose code that might throw an exception.

What is 'try'?

100

This Java class is commonly used to read bytes from a file in a byte stream.

What is "FileInputStream"?

100

This class is a class inside a class accessed from outside the class through the outer class

What is a static nested class?

100

This notation is used to describe the worst case scenario of an algorithm's performance.

What is Big O Notation?

200

This command adds all changes in the current directory to the staging area.

What is git add . ?

200

When you throw an exception, you must do this to prevent the program from crashing.

What is 'catch it'?

200

This class in Java provides methods to read and write text files more efficiently by buffering characters.

What is "BufferedReader()" or "BufferedWriter()"?

200

This keyword is used to refer to the superclass constructor within a subclass, allowing initialization of the inherited attributes. What is this keyword?

What is super?

200

This is an algorithm that is slower than linear and faster than quadratic

What is O(nlogn)?

300

This command is used in the command line to create a new directory.

What is: mkdir <directory_name>?

300

This exception is thrown when attempting to divide a number by zero.

What is 'ArithmeticException'?

300

This method in the DataInputStream class allows you to read a boolean value from a binary file.

What is "readBoolean()"? 


300

This class cannot be inherited from

What is final class?

300

In the worst case, quicksort performs this many comparisons when the pivot always picks the worst element.

What is O(n^2)?

400

This command combines the changes from the "feature" branch into the current branch.

What is git merge feature?

400

This exception is thrown when attempting to access an array index that does not exist.

What is 'ArrayIndexOutOfBoundsException'?

400

This java.nio.file class provides methods to perform atomic file operations, such as moving or copying files, ensuring that the operations are either completed successfully or not at all.

What is "Files"?

400

When a subclass provides a specific implementation of a method that is already defined in its superclass, this is known as what?

What is overriding?

400

The big O runtime for this code:

public static int notSoMysteriousMystery(int[] array, int target) {
   int left = 0;
   int right = array.length - 1;
   while (left <= right){
      int mid= left + (right - left) / 2;
      if (array[mid] == target) {
         returnmid;
      }
      if (array[mid] < target) {
      left = mid + 1;
      }
      else{
         right = mid - 1;
      }
   }
   return -1;
}

What is O(log n)?

500

This pipeline command finds all .txt files in the current directory, searches for a specific string ("bob") in them and counts how many times "bob" appears across all the files.

what is: grep -roh "bob" *.txt | wc -l?


500

This type of exception occurs at runtime and does not need to be declared in a method's throws clause.

What is an "Unchecked Exception"?

500

This method of the RandomAccessFile class allows you to set the file pointer to a specified position, enabling reading or writing at any point in the file.

What is "seek(long pos)"?

500

Can be inherited from multiple of

What is an interface?

500

The time complexity for the following code:

public void notSoMysteriousMystery2(int[] arr) {
   for (int i = 1; i < arr.length; i++) {
      for (int j = 1; j < arr.length; j++) {
         System.out.print("*");
      }
      System.out.println();
   }
}

What is O(n^2)?

M
e
n
u