Declare a String array variable "s" (but don't create the array)
What is "String [] s" ?
This principle means that an object contains both data and the methods that operate on the data.
What is encapsulation ?
Collection of unordered items, no duplicates
What is a Set?
3-letter acronym means you should avoid duplicate code or duplicate logic.
What is DRY?
(Don't Repeat Yourself)
Python name of a collection of key-value pairs.
What is a dict?
This package contains Java collections.
What is java.util ?
It means to create one thing or concept to represent a more complex thing, so that unnecessary details are removed.
What is abstraction ?
Ordered collection of items, may contain duplicates, and items can be added or read at anyway in the collection.
What is List?
This principle means you should be able to extend the behavior of a class without modifying the class's code.
What is the Open-Closed Principle?
Similar to a list but immutable.
What is a tuple?
A class that is used to sort and search different kinds of collections.
What is Collections? (java.util.Collections)
Many classes can implement the same method but provide different implementation. We can invoke the method (behavior) on different objects, without knowing which type will perform the behavior.
What is polymorphism ?
A collection of keys and values. For each key there is at least one value in the collection
What is a Map ?
Alt: "dict" ok for Pythonistas, but the datatype is usually called a "map".
This Design Pattern enables us to ensure only one instance of a class is created.
What is Singleton?
This exception is raised when you invoke a function using an invalid argument, but correct data type, such as math.log(-1).
What is ValueError
An interface that specifies a single method named "run()".
What is Runnable ?
One class can build on another class by incorporating all its attributes and methods.
What is inheritance ?
Collection that obeys "first in first out" access. You "push" elements in one end and "pop" from the other end.
What is a Queue.
One of the 5 "C" words of class interface design, it means that a class should provide enough methods to perform everything its required to do.
What is Completeness?
For a Python statement to span multiple lines without using \ (explicit continuation), the line must contain an unfinished expression using one of these 3 characters.
What are parens (), braces {}, and brackets []?
Ex: x = ( a + sqrt(b)
) / 2
Any statement with unclosed (, {, or [ is implicitly continued on the next line. (So don't write really long statements on one line!)
A mutable String class that is also thread-safe.
What is StringBuffer?
(StringBuilder is almost identical but not thread-safe)
A property of a class's methods that means all the methods are related to each other and to the responsibility of the class.
What is [High] Cohesion ?
Collection that is both a queue and a stack. You can push/pop elements on either end. But no where else.
What is a Deque?
2 words meaning not to depend on too many other classes or components, esp. unstable ones.
What is Low Coupling?
An expression or statement that creates an anonymous or unnamed function.
What is lambda.
Ex: add = lambda x,y: x+y