Recursion
Booleans
Arrays
Potpurri
100

What is recursion in programming?

Recursion is a programming technique where a method calls itself to solve a problem by breaking it down into smaller subproblems.

100

How many types of answer can you recieve from a boolean statment.

2: true and false

100

What is the index of the first element in an array in Java?

The index of the first element in an array is 0.

100

What is the purpose of the "this" keyword in Java?

 The "this" keyword refers to the current instance of a class and is used to access instance variables or invoke other constructors within the same class.

200

What are the two main components required for a recursive method?

base case and recursive case

200

What is the value of the expression "true && false" in JavaScript?

 false

200

How do you access the value at index 3 in an array named "myArray" in Java?

myArray[3];

200

What is the difference between the "==" operator and the ".equals()" method in Java?

 The "==" operator compares the memory addresses of objects, while the ".equals()" method compares the actual contents of objects.

300

What is the difference between direct recursion and indirect recursion?

Direct recursion occurs when a method directly calls itself. Indirect recursion occurs when a chain of method calls results in a method calling itself indirectly.

300

!(!(!(!(T||F))))

true

300

How do you declare an array of integers named "numbers" with a length of 5 in Java?

 int[] numbers = new int[5];

300

What is the purpose of an interface in Java?

An interface in Java defines a contract for a group of related classes, specifying the methods that these classes must implement.

400

When using recursion, what is the purpose of the call stack?

The call stack keeps track of method calls and their corresponding variables, allowing the program to return to the correct point after each recursive call completes.

400

whati s demorgans law

conditional stamtents

400

Explain the difference between arrays and ArrayLists in Java.

Arrays have a fixed length and their size cannot be changed once defined. ArrayLists, on the other hand, are part of the Java Collections Framework and can dynamically grow or shrink in size.

400

Explain the concept of inheritance in object-oriented programming

Inheritance allows a class to inherit the properties and methods of another class, known as the superclass. It enables code reuse and the creation of more specialized classes based on existing ones.