Ben's Week 1 QC

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What does the final keyword do? Where can I use it?

-Final is a keyword that has a different effect based on where you're using it. It's a non-access modifier, and in general it renders things unchangeable. -Final Classes can't be extended (no subclasses) -Final Methods can't be overridden by child classes -Final Variables can't be modified after initialization

Can I put different types of objects in an array?

-No, they must be the same type. You can change the values in an array as long as they are of the same type.

Comparable/Comparator

-These are both interfaces that we can use to sort elements.They are bith ends to similar means -Comparable can only be used to compare instances of the same class -An interface which defines the natural ordering for a class(the default order like alphabetically) A class must implement Comparable in order to br sirted by the .compareTo() method see ben's notes -Comparator can be used to compare instances of different classes. Comparator is more flexible in this way Comparator is an interface which allows you to define a total ordering on some collection of objects. A class that is to be sorted by compare() does not have to implement Comparator. public interface Comparator<T> { public int compare(T firstObject, T secondObject); }

What behavior do all collections share?

All collection classes have consistent implementation and provide some common methods like add, get, put, remove etc. No matter what kind of data structure you are dealing with, these methods work according to underlying implementation and perform actions transparently.

What is an Iterator?

An Iterator is an object that can be used to loop through collections, like ArrayList and HashSet. It is called an "iterator" because "iterating" is the technical term for looping. To use an Iterator, you must import it from the java.

What are some concrete instances of the interfaces in the collections api?

ArrayList, LinkedList, HashMap, TreeSet, TreeMap, HashSet?

What are the pieces of a class in Java?

Classes contain fields (variables) and methods (functions): Fields are variables that store information about the object. Methods are blocks of code that represent actions the object can take. Think of fields like attributes, and methods like behaviors.

How would we create a thread using the thread class?

Create a class that extends Thread -implement the run() method -instantiate your class -call the start() method

Creating Threads using Runnable Interface

Create a class that implements the Runnable functional interface -implement the run() method -pass an instance of your class to a Thread constructor -call the start() method on the thread REMEBER: Runnable is a functional interface

How do I access an array?

Each member or entry in the array has a specific index. This allows you to quickly find a single value in the array. The first index of an array is always 0." -Arrays are zero-indexed objects that store the same type of data sequentially

Stack and Heap

Inside the JVM, our application memory is divided into the "stack" and the "heap". The stack is where method invocations and reference variables are stored in stack frames. For example, when the JVM invokes the main method a stack frame is created for it and placed on the stack. Multiple stacks are possible - for example, when a thread is created it is given its own stack. The heap, in contrast, is a central location in memory where all objects are stored. New objects are created via the new keyword and (optionally) assigned to a reference variable, which can then be re-assigned to reference different objects later. Thus, multiple reference variables could point to the same object in memory. Note: Errors at runtime can be thrown if a program runs out of memory addresses for new stack frames (StackOverflowError), or if no memory is available in the heap for object creation (OutOfMemoryError).

How do I call an instance method?

Instance methods are methods which require an object of its class to be created before it can be called. To invoke an instance method, we have to create an object of the class in which it is defined.

What are dependencies and what are they used for?Example of dependencies we've used?

Maven dependencies are how we add extra functionality to our maven projects. We get our Maven dependencies from the Maven Repository read more on the maven repository below on the Install phase of the Maven Lifecycle.

Can I Inherit More than one class?

No, Java does not support multiple inheritance with classes. You can, however, implement as many interfaces as you like.

Packages and Import Packages

Packages are a way of organizing classes, interfaces, and enums in a hierarchical manner. Packages follow a naming convention of lowercase characters separated by periods in the reverse way you would specify a web domain - thus, com.revature.mypackage instead of mypackage.revature.com.

Getters and Setters

Private variables/classes/methods can only be accessed within the same class (an outside class has no access to it). However, it is possible to access them if we provide public get and set methods. The get method returns the variable value, and the set method sets the value. Syntax for both is that they start with either get or set, followed by the name of the variable, with the first letter in upper case: Ex. getName();

What are Strings? Are they Objects?

Strings are "strings" of characters (chars). Because words and sentences etc. are so often used in programming, Java defines a String class with particular methods (functionality) to support their use in development. Are they Objects? Yes, strings are objects and not primitives.

The Maven Life Cycle

When Maven builds 1. Validate -ensures it's a Maven project and everything is where it needs to be before we start compiling this project 2. Compile - compiles project source code 3. Test - tests all compiled code 4. Package - packages all compiled code to WAR/JAR file 5. Integration - performs all integration tests on WAR/JAR 6. Verify - runs checks on the results of integration tests 7. Install - installs WAR/JAR to local repository 8. Deploy - copies final WAR/JAR to the remote repository

What does the static keyword do?

static - The method resides with the class, not the objects created from the class. Therefore we can use static methods without having to create instances (objects) of the class. Static methods can only call other static methods directly. Class (static) scope - Static variables declared in a class. The variable is accessible to all objects of that class. (static int i = 0) -Java is variable which belongs to the class and initialized only once at the start of the execution. It is a variable which belongs to the class and not to object(instance ). Static variables are initialized only once, at the start of the execution. -The static keyword ensures that the method resides with the class, not the objects created from the class. -Therefore we can use static methods without having to create instances (objects) of the class.

Design Patterns

-A software template. -A programming design to base your code off of. Java has a bunch of classes that implement design patterns, so we won't usually have to make them ourselves. -Some popular design patterns: Singleton Factory Decorators Prototype Publisher-Subscriber

What are access modifiers? How many do I have and what do they do?

-An access modifier determines the availability/visibility of the method to outside classes. How many do I have and what do they do? private - only accessible to the class itself. default - only accessible inside the package. (don't have to specify default) protected - accessible to anything in the same package plus any subclasses of the owning class. public - accessible to any class in the project/application.

What is Maven? What is it used for?

Maven is a dependency manager and build automation tool for Java programs. Maven project configuration and dependencies are handled via the Project Object Model, defined in the pom.xml file. This file contains information about the project used to build the project, including project dependencies and plugins.

Serialization

Serialization is the process of writing the state of an object to a byte stream; the reverse is called deserialization. In order for an object to be serialized, it must implement the Serializable interface. Serializing an object To serialize an Object, you need a FileOutputStream instance inside the constructor of an ObjectOutputStream, passing in the file path of where you want the Object to be serialized Call the ObjectOutputStream.writeObject(yourObject) method Deserializing an object To deserialize an Object, you need a FileInputStream instance inside the constructor of an ObjectInputStream, passing in the file path of where the serialized object is Call the ObjectInputStream.readObject() method, casting it to a bean of your type

Do I use == or .equals with Strings? Why?

The equals() method is used to determine if one String is equivalent to another or not. It accepts a single parameter which should be another String value and returns a boolean true if both the argument and the current object are equivalent, false otherwise.

How do I call a class method?

To call a method, write the method's name followed by two parentheses () and a semicolon.

How does garbage collection work in Java?

- Java garbage collection is the process by which Java programs perform automatic memory management. -We're never going to implement garbage collection, it's happening behind the scenes -In other words, the process of removing objects from the heap which have no references to them. -When Java programs run on the JVM, objects are created on the heap, which is a portion of memory dedicated to the program. Eventually, some objects will no longer be needed. The garbage collector finds these unused objects and deletes them to free up memory. Java garbage collection is an automatic process. The programmer does not need to explicitly mark objects to be deleted. The garbage collection implementation lives in the JVM.

What is a method?

-A block of code that is executed whenever it is called upon -It will execute the same functionality whenever invoked (or called). -Think of a method as a "Start Here" sign -Methods follow the following syntax: modifier return_type methodName(parameters) exceptions { //method body -In other words, Objects have states and behaviors, and methods represent the functionality/behavior of an object -Methods are the primary way that we interact with objects and change their states -You can pass data, known as parameters, into a method. -A method must be declared within a class.

What is Null?

-A keyword/reserved word -In Java, null is a reserved word (keyword) for literal values. It seems like a keyword, but actually, it is a literal similar to true and false. #null used as a default Every primitive type of variable has a default value (e.g. int has 0, boolean has false) if not initialized at the time of declaration. Similarly null is the default value of any reference type variable which is not initialized at the time of declaration. #null - Casting to other types null is not an Object or neither a type. It's just a special value, which can be assigned to any reference type. Typecasting null to any reference type is fine at both compile-time and runtime and it will not throw any error or exception. -Null can only be assigned to reference types. We cannot assign null to primitive variables e.g. int, double, float or boolean. If we try to do so, then the compiler will complain.

Singleton

-A singleton is a Class that can have only one object (instance) at a time. Hence the "singleton" -What's the point? The "new" keyword creates a new object of a class whenever it's used. BUT sometimes you don't want multiple different objects of a class. Maybe you want all the attributes of the Class to be consistent across all instances Using a singleton ensures that only one object can ever be instantiated. There will never be two+ different instances of a Class. -How do we implement it? Arguably, the most common way to achieve a singleton class is to have a private constructor, and a static method that creates an object of the Class (using the private constructor) To make a class into a Singleton, use: 1. private static variable of the class' type 2. private constructor - to prevent arbitrary object creation 3. public static getInstance() method, which will either instantiate the object or return the instance in memory

What is Thread? Why do we use them?

-A thread is a thread of execution in a program. -A "thread" is a series of instructions that must in a row. But your computer may switch which is being run at any time Threads allow a program to operate more efficiently by doing multiple things at the same time (concurrency). threads can be used to perform longer, more complicated tasks in the background without interrupting the main program. In other words, we don't have to way for a process to finish to start another process. they all happen at the same time -Think of a thread as a "path of execution" or a process, but they can access the same objects in memory. Any program you run is a thread/process -Every thread that is created in a program is given its own call stack, where it stores local variables references. However, all threads share the same heap, where the objects live in memory. Thus, two threads could have separate variable references on two different stacks that still point to the same object in the heap. -there are two ways to create threads in Java. Extend the thread class or implement the Runnable interface. Then, calling the start() method will create a thread and then use whatever is in the run() method as the base method for the execution flow (kind of like a mini main method) -Threads run independently so there is no way to ensure the order in which threads will run in comparison to each other The Java Virtual Machine allows an application to have multiple threads of execution running concurrently. Every thread has a priority. Threads with higher priority are executed in preference to threads with lower priority. Each thread may or may not also be marked as a daemon. When code running in some thread creates a new Thread object, the new thread has its priority initially set equal to the priority of the creating thread, and is a daemon thread if and only if the creating thread is a daemon. Thread methods A few important methods in the Thread class include: getters and setters for id, name, and priority interrupt() to explicitly interrupt the thread isAlive(), isInterrupted() and isDaemon() to test the state of the thread join() to wait for the thread to finish execution start() to actually begin thread execution after instantiation A few important static methods are also defined: Thread.currentThread() which returns the thread that is currently executing Thread.sleep(long millis) which causes the currently executing thread to temporarily stop for a specified number of milliseconds

Annotations

-Annotations begin with the @ symbol -Annotations are often used by libraries to provide additional functionality -they provide meta data to the compiler/JVM. They can be used on classes, methods, interfaces, and most other constructs -Annotation also helps with readability of our code -Java has a few built in annotations Ex. @Override- declares that a method must override the parent's method @Depricated- method is obsolete @SuppressWarnings -Instructs the compiler to suppress any compilation warnings such as those generated by @Depricated --We also use a lot of annotations in testing which we'll see with Maven and Junit

What about array sizes?

-Arrays are fixed length (the length property is final) to ensure it knows how much memory it needs. -If you need a larger/smaller array you have to create a new array object in memory. -Since the length of the array is property, you can access it as a field variable of the array itself. You do not need a method to find the length.myArray.length not myArray.length()

Why use arrays?

-Arrays are used when there is a need to use many variables of the same type. It can be defined as a sequence of objects which are of the same data type. -It is used to store a collection of data, and it is more useful to think of an array as a collection of variables of the same type. -Without arrays you would have to store each object separately, so arrays save a lot of memory.

What are arrays?

-Arrays in Java are objects that store the same type of data sequentially -Arrays in Java are of a fixed size and cannot be resized after declaration. -Arrays are declared with square brackets after the type of the array like so: int[ ] myInts = new int[ ]{1, 2, 3, 4}; String languages[ ] = {"Java", "JavaScript", "SQL"}; -Items in an array are referenced via their index in square bracket notation, which begins with 0 for the first element. Arrays also have a length property specifying the length of the array. (ex. myArr.length)

What is a reference?

-In the pass by reference concept, the method is called using an alias or reference of the actual parameter. So, it is called pass by reference. It forwards the unique identifier of the object to the method. If we made changes to the parameter's instance member, it would affect the original value. -Java does not support pass by reference concept.

JVM VS JRE VS JDK

-JDK = JRE + Development Tools -JRE = JVM + Libraries -JDK is an acronym for Java Development Kit. The Java Development Kit (JDK) is a software development environment which is used to develop Java applications and applets. It physically exists. It contains JRE + development tools. -JRE: It is used to provide the runtime environment. It is the implementation of JVM. It physically exists. It contains a set of libraries + other files that JVM uses at runtime. -JVM (Java Virtual Machine) is an abstract machine. It is called a virtual machine because it doesn't physically exist. It is a specification that provides a runtime environment in which Java bytecode can be executed. Think of the JVM as a program that can read .class files and talks to your operating system and tells it what to do. So, to recap - the JDK contains tools for Java development as well as a JRE, which contains the built-in Java libraries as well as a JVM, which actually executes your Java bytecode and runs it on the specific operating system it is installed upon.

JDK

-Java Development Kit => Everything needed to write/compile Java Code. -Compiler - Turns source code (human readable) to Java Bytecode (JVM/machine Readable). -Dev Tools - Tools specific for developers writing source code. -Debugger - helps debug issues -Documentation tools -Contains the JRE The Java Development Kit (JDK) is a software development environment which is used to develop Java applications and applets. It physically exists. It contains JRE + development tools. NOTE: JDK is not required for everyone. Only required for developers, hence its name Java DEVELOPMENT kit

JRE

-Java Runtime Environment => Everything needed to run a Java application. -Built in libraries which help our application development such as...Maven, Hibernate-ORM, Mockito -Contains the JVM -The JRE is responsible for running our java programs -Runtime environment runs our code. -It is the implementation of JVM. It physically exists. It contains a set of libraries + other files that JVM uses at runtime. -If you just want to run java, you only need to download the JRE, if you are a regular person that needs to run java code NOTE: Eclipse uses JRE, not JDK

Is Java pass by value or reference?

-Java is STRICTLY a pass-by-value language -When a variable is passed into a method, a "copy" of that variable is made and manipulated within the scope of the method -This means that the value of the original variable will be unaffected by changes made within the method -In other words, the method is called by passing a value. So, it is called pass by value. It does not affect the original parameter. -Java does not support pass by reference concept.

What is Java? Is it complied? Is it high level?

-Java is a high level programming language that uses OOP. It is high level because it is intended to be written and read in a manner where humans can interpret it. -Java is strongly and strictly typed. It is strongly typed because variables are not implicitly converted and must be declared with its data type. For example, instead of saying a = 5, you must declare a data type e.g "int a = 5". It is strictly typed because once variables have been declared, their values cannot be changed.

What are parameters?

-Parameters are input values that your method can accept. -You can have any number of parameters that you like. You probably shouldn't write methods that declare very long lists of parameters however, as it'll get very difficult to manage.

How does the String Pool work?

-String objects are stored in a special memory area known as String Pool. -In the above example, only one object will be created. Firstly JVM will not find any string object with the value "Helloworld" in string constant pool so it will create a new object. After that it will find the string with the value "Helloworld" in the pool, it will not create the new object but will return the reference to the same instance. String s1 = "Helloworld"; String s2 = "Helloworld"; String s5 = "Helloworld"; -The "Greeting" object is created by using the new keyword, this "Greeting" object stored in the heap memory. String s4 = new String("Greeting"); -String pool is possible only because String is immutable in Java, this way Java Runtime saves a lot of java heap space because different String variables can refer to a same String variable in the pool. This String Pool process we have seen in this post

What is the relationship between hashcode and equals?

-The value returned by hashCode() is the object's hash code, which is an integer value generated by a hashing algorithm. How objects in memory get a unique identifier By definition, if two objects are equal, their hash code must also be equal. If you override the equals() method, you change the way two objects are equated and Object's implementation of hashCode() is no longer valid. Therefore, if you override the equals() method, you must also override the hashCode() method as well. -Equals lets you compare objects to one another using their hash code. -Hash code and equals go hand in hand OR (Rev Pro) -The hashCode( ) method returns a hash code - a number that puts instances of a class into a finite number of categories. There are a few rules that the method follows: You are expected to override hashCode( ) if you override equals( ) The result of hashCode() should not change in a program if .equals() returns true, the hash codes should be equal if .equals() returns false, the hash codes do not have to be distinct. However, doing so will help the performance of hash tables.

What is the Object Super Class?

-This is a special class in Java which is the root class from which all other classes inherit, either directly or indirectly. Thus, all objects have at least the methods defined in the Object class: Object clone() boolean equals(Object o) void finalize() Class<?> getClass( ) int hashCode( ) void notify( ) void notifyAll( ) String toString( ) void wait( ) void wait(long timeout) void wait(long timeout, int nanos) -The Object class is the superclass of all other classes in Java and a part of the built-in java.lang package. If a parent class isn't specified using the extends keyword, the class will inherit from the Object class

How do I use an Interface on a class? Can I have more that one interface on a class?

-To access the interface you must use the "implements" clause in your class declaration, e.g, Class Dog implements Animal -Yes, a class can implement multiple interfaces

Is Java functional? Is it OOP?

-While Java has some functional programming built into it, it is not functional at its core. -It is a general purpose programming language with class based object orientation.

How do I declare a variable?

-You declare a variable using '=' -A variable must have a name, a value, and a type or datatype. -Ex. int a = 3; Remember: Variables once declared can not change their value type.

What is a unit test?

-a piece of code written by developer that executes a particular part of the code being tested -Unit testing is the testing of individual software components in isolation from the rest of the system. This is done by writing unit tests which execute the code we want to inspect. -In unit testing, we're just testing the smallest units of code to ensure that everything is functioning as intended, so in Java's case, we'll be testing methods

Can I force garbage collection?

-garbage collection is run in the background by the JVM. There is no way we can explicitly force garbage collection to happen, but we can request/suggest garbage collection to be run through the use of one of the following: -System.gc( ) -Runtime.getRuntime( ).gc( ) -System.runFinalize( )

Factory

A Factory is a class that lets us create objects without exposing the creation logic to the user. Great way to clean up your code! By "creation logic" I mean the code required to create the object What's the point? Using the "new" keyword is fine... if you're only making a couple types of one Object But what if we have a Laptop Interface and 50 different implementations for each brand of laptop? We would have to write a huge chunk of code (maybe in a switch statement?) using the "new" keyword for each possible type of implementation. Worse yet, what if a new brand of laptop emerges or an existing brand vanishes? You'd have to go in and change that already big, ugly, block of creation logic code. This problem can make your code super messy. But this is where the Factory design pattern comes in. Another classic example of Abstraction. Makes sense that it's called a "Factory" right? It makes object creation a lot easier How do we implement it? We'll need an Interface that represents a generic type of Classes Eg. a Laptop Interface, implement by Classes Toshiba, Dell, Mac, etc. We simply move all of the decision-making object-creating code into a entirely separate class ending with Factory eg. LaptopFactory. Separation of concerns! In this way, you can abstract away a lot of the decision making code, so that ideally, you can simply have lines of code like this: LaptopFactory.getLaptop("Toshiba"); //and a Laptop of type "Toshiba" will be created for you "automagically".

How do I inherit a class in Java?

A class can extend another class with the "extends" keyword, thus inheriting that class's traits. This establishes a parent class/child class relationship, aka superclass/subclass.

Lambdas

A lambda expression is a short block of code which takes in parameters and returns a value -Lambdas are similar to methods but they do not need a name and they can be implemented in the body of a method -This allows you to create a single use, unnamed (anonymous) methods that can be passed as parameters -the most basic syntax of a lambda expression is (parameters(s)) -> expression NOTE: The parameters must be a variable type, NOT a primitive(This function was create in Java 8)

Setting Logging Threshold

A logger can be assigned a threshold level. All logging requests with level lower than this threshold will be ignored. For example, setting logger threshold to INFO means that logging requests with levels TRACE and DEBUG will not be logged by this logger. If not explicitly configured, loggers will have their threshold level set to DEBUG by default.

Custom Exceptions

A programmer can create custom exceptions in Java by extending any exception class. If you extend RuntimeException, however, you will be creating an unchecked exception. This is a good idea if you do not want other code to have to handle your exception being thrown. If you do always want to require your exception to be handled, then create a checked exception by extending any existing one, or the Exception class itself.

How do Interfaces and Abstract Classes differ? How are they the same?

Abstract class vs Interface Type of methods: Interface can have only abstract methods. An abstract class can have abstract and non-abstract methods. From Java 8, it can have default and static methods also. Final Variables: Variables declared in a Java interface are by default final. An abstract class may contain non-final variables. Type of variables: Abstract class can have final, non-final, static and non-static variables. The interface has only static and final variables. Implementation: Abstract class can provide the implementation of the interface. Interface can't provide the implementation of an abstract class. Inheritance vs Abstraction: A Java interface can be implemented using the keyword "implements" and an abstract class can be extended using the keyword "extends". Multiple implementations: An interface can extend another Java interface only, an abstract class can extend another Java class and implement multiple Java interfaces. Accessibility of Data Members: Members of a Java interface are public by default. A Java abstract class can have class members like private, protected, etc. (Rev Pro) Difference between interface and Abstract classes Conceptually, interfaces define behaviors and abstract classes are for concepts and inheritance. You can implement multiple interfaces, but you can extend only one class. How are they the same? Neither Abstract classes or Interface can be instantiated.

What are the 4 pillars? Examples of each in Java

Abstraction - Hiding implementation details from the user, so that there's more focus on behavior, as opposed to how that behavior is actually working under the hood. For instance, the user only needs to know what the .add method does in a List. You don't necessarily need to know how the .add method actually works. This makes your code a lot cleaner/readable. Good metaphor: When driving a car, you don't need to know how the engine works. You just need to know, gas pedal make car go, steering wheel make car turn. Encapsulation - Mechanism of wrapping data and code into a single unit. It's practiced by: private access modifiers for a Class's instance members (fields). providing access to the private fields through getter and setter methods. It's like a protective shield for your data, but with certain entry and exit points for the data to be manipulated or sent out (which are your setter and getter methods, respectively). Why do this? It lets us control who can see and modify the data. That's pretty much it. Inheritance - process where one class acquires the property of another. (methods/fields). Used for code reuse and dynamic polymorphism. Say we have an "Animal" interface. We also have a bunch of different classes (Dog class, Cat, class, Axolotl class) that implement that Animal interface, thus sharing a bunch of Animal attributes. Think Implementing Interfaces and Extending Classes Polymorphism - The ability of an object to take on many forms. So when we have classes implementing the Animal interface, that's the Animal interface taking on many different forms. All those implementing classes ARE Animals. AKA different forms of Animals. Method overloading/overriding are other very common examples of polymorphism Different forms of the "same" method.

What is an objects relation to a class?

An object is an instance of a class. Objects are created using the class as a blueprint for their initial state and behavior. Objects are created with the "new" keyword. They use constructors (which functionally are the same as static methods) to be built.

Implementations of List

ArrayList -> uses an Array under the hood that can be sized dynamically. Fast access to the middle and ends Slow inserts and deletes in the middle LinkedList -> uses a series of nodes that point to the next node in the List Fast inserts, given that you have the adjacent node to the one you're inserting. Especially at the beginning/end Slow access to elements in the middle ALSO implements the Queue Interface Stacks -> wildly predate the Collections framework The whole point is LIFO - last in first out. Just like the stack in Java memory Vectors - they're like stacks grandfathered in, and can't be removed for legacy reasons DON'T USE THEM OR STACKS >:( If you want a stack -> use ArrayDeque

States of a Thread

At any given time, a thread can be in one of these states: New: newly created thread that has not started executing Runnable: either running or ready for execution but waiting for its resource allocation Blocked: waiting to acquire a monitor lock to enter or re-enter a synchronized block/method Waiting: waiting for some other thread to perform an action without any time limit Timed_Waiting: waiting for some other thread to perform a specific action for a specified time period Terminated: has completed its execution. A thread has died

AutoBoxing & AutoUnboxing?

Autoboxing is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes. For example, converting an int to an Integer, a double to a Double, and so on. If the conversion goes the other way, this is called unboxing. -In other words, we never spend much time thinking anout autoboxing or unboxing because it usually happens under the hood

Log4j Logging Levels

Below are the Log4j log levels, in order of least to most restrictive: 1. ALL => all levels 2. DEBUG => designates fine-grained informational events that are most useful to debug an application 3. INFO => informational messages that highlight the progress of the application at the coarse grained level 4. WARN => designates potentially harmful situations 5. ERROR => designates error events that might still allow the application to continue running 6. FATAL => severe error events that presumably lead the application to abort 7. OFF => highest possible level, intended to turn off logging How do logging levels work? A log request of level x in a logger with level y is enabled with x >= y. For the standard levels, we have that ALL < DEBUG < INFO < WARN < ERROR < FATAL < OFF

Casting

Casting is "changing" from one variable type to another. It generally has to be done with objects that share an inheritance relationship. The object itself never changes type, rather the variable holding will have a different declared type. Two types - upcasting and downcasting Upcasting is assigning a child class object to a parent class reference variable. Going up the inheritance tree, hence *up*casting What's the point? => "Upcasting gives us the flexibility to access the parent class members (variables/methods), while hiding some of the child class members. For instance, we can only access the overridden methods in the child class." This is implicitly performed by the compiler. (We don't have to write it) Downcasting is assigning a parent class reference variable (which has a child class object assigned to it) to a child class reference variable. This can lead to exceptions if you attempt to downcast an object incorrectly. Going down the inheritance tree, hence *down*casting What's the point? => This lets a child class access the members of the parent class, while still having access to its own members. For instance, with downcasting we'd be able to access the child class's members. Downcasting must be done explicitly with the "cast" being specified with the new type in parentheses. Animal animal = new Cat(); Cat c = (Cat) animal; A wise man once said, if you find yourself downcasting often, your code is bad.

What are checked exceptions? Unchecked Exceptions? Errors?

Checked Exceptions (Compile Time Exceptions): These are anticipated when possible, so the compiler will require you to handle them in some manner before it will compile. (Handle exceptions using the throws keyword or a try catch block). The compiler can see them and "checks" for them, hence checked exception FileNotFoundException Any Input/Output (I/O) Exception really ClassNotFoundException Unchecked Exceptions? Unchecked Exception (Runtime Exceptions): The compiler can not anticipate these, so it has no way of requiring you to preemptively handle them. Hence unchecked exception. Generally, these are problems in the logic of the code itself that can be avoided instead of requiring handling. ArrayIndexOutOfBoundsException NullPointerException Errors? Errors are problems that the application can not reasonably be expected to recover from on its own. StackOverflowError - your JVM ran out of memory to keep running the process you're running. Think like an infinite loop. The "Stack" runs out of memory, thus "Overflows"

Collection vs collections? How do maps fit in? (or not fit in...)

Collection: Collection is a interface present in java.util.package. It is used to represent a group of individual objects as a single unit. It is similar to the container in the C++ language. The collection is considered as the root interface of the collection framework. It provides several classes and interfaces to represent a group of individual objects as a single unit. The List, Set, and Queue are the main sub-interfaces of the collection interface. The add(), remove(), clear(), size(), and contains() are the important methods of the Collection interface. -Every collection is an object that contains and manipulates a group of objects -Similar to arrays, they do hold values but collection only deal with objects and have WAY ire functionality. -Every Collection inherits frim the Collection Interface, which extends the Iterable interface. Thus we can iterate through every type of collection Collections: Collections is a utility class present in java.util.package. It defines several utility methods like sorting and searching which is used to operate on collection. It has all static methods. These methods provide much-needed convenience to developers, allowing them to effectively work with Collection Framework. For example, It has a method sort() to sort the collection elements according to default sorting order, and it has a method min(), and max() to find the minimum and maximum value respectively in the collection elements. -The collections class has a bunchof static methods that all types of collections can use See https://www.geeksforgeeks.org/collection-vs-collections-in-java-with-example/ for more detail How do maps fit in? (or not fit in...) The map interface is also part of the java collection framework, but it doesn't inherit the collection of the interface. -Maps are not Iterables (we cannot iteate through them), they do not extend collections but they have similar behavior -Think of Maps like dictionaries, they have unique key value pairs --Order ->Most maps are ordered by the key but some aren't -Index-> No index, use key to find element -Duplicates->. Keys must be unique, values can be duplicate -Nulls->Keys can't be nulls. Keys must refer to a value which can be null

What are some concurrency issues you know of? And how do we solve some concurrency issues?

Concurrency refers to breaking up a task or piece of computation into different parts that can be executed independently, out of order, or in partial order without affecting the final outcome. -this are issues that arise during multithreading Two types of concurrency issues: Deadlock: This occurs when two threads are competing for the same set of resources and neither is willing to give up the part of the set that they control. This can cause application to stall out and run indefinitely. This can be solved by giving some threads priority Starvation: Similar to deadlock in that threads are competing but in this case one thread has all the resources that another needs. So the thread that is starved for resources is stalled for a period of time. This can be mitigated by having threads release resources when they aren't actively using them How do we Solve Concurrency Issues? -Synchronization - will "lock down" a method or class/object to a single thread having access to it at a time. We use this when we want one thread to access a resource at a time -yield( )- another way to avoid deadlock. will pause a thread, giving up its resources to the other thread that needs them join ( )- will combine the stack of the thread back with main. the method will wait for the thread to die isAlive( ) -will check to see if a thread is still active .

Why use interfaces or abstract classes?

Consider using abstract classes if any of these statements apply to your situation: -You want to share code among several closely related classes. -You expect that classes that extend your abstract class have many common methods or fields or require access modifiers other than public (such as protected and private). -You want to declare non-static or non-final fields. This enables you to define methods that can access and modify the state of the object to which they belong. Consider using interfaces if any of these statements apply to your situation: -You expect that unrelated classes would implement your interface. For example, the interfaces Comparable and Cloneable are implemented by many unrelated classes. -You want to specify the behavior of a particular data type, but not concerned about who implements its behavior. -You want to take advantage of multiple inheritances.

What is a method signature?

In Java, a method signature is part of the method declaration. It's the combination of the method name and the parameter list. The reason for the emphasis on just the method name and parameter list is because of overloading. It's the ability to write methods that have the same name but accept different parameters. The Java compiler is able to discern the difference between the methods through their method signatures. Method signature of the main method? The signature of the main method is public static void main(String[] args) { }

What is JUnit and why do we use it?

JUnit is a Java framework for unit testing. JUnit has several annotations within the org.junit package that developers can use to create tests and setup test environments: -Junit provides annotations and methods for creating unit tests Example JUnit annotations @Test - labels a method as a test method @BeforeEach - Runs before every test method @BeforeAll - declares a setup method that runs before each test method @AfterAll - declares a tear-down method that runs before each test method @AfterEach -Runs after every test method @Ignore- Will tell a test not to run When writing a test method, JUnit helps us check the functionality of the code being tested by providing static Assert methods, of which there are many. A few include: assertTrue() - tests some expression on whether it returns true or not value true Ex. assertTrue(n == 8) assertFalse() assertEquals() -tests that the method output is equivalent to some value assertNotEquals() assertThat()- a general assertion that you have to define the functionality of assertThrows() -this can test for exceptions but this requires the use of lambda functions Assertions verify that the state of the application meets what is expected.

JVM

JVM - Java Virtual Machine => Runs your code (the compiled bytecode) in a virtual environment that is the same across devices. The JVM you use is specific to your machine's OS. -JIT - Just-In-Time compiler => Turns byte code into machine code essentially line by line as it runs. -It is called a virtual machine because it doesn't physically exist. It is a specification that provides a runtime environment in which Java bytecode can be executed. It can also run those programs which are written in other languages and compiled to Java bytecode. -The JVM performs the following main tasks: Loads code Verifies code Executes code Provides runtime environment

Control Flow Statements

Java, like most other languages, has a few keywords that define statements which control the flow of program execution: if/else if/else : for : For-loops are used to iterate over data structures. They include 3 statements in parentheses - a declaration, condition, and statement (typically increment or decrement). for (int i=0; i < myData.length; i++) { while : While statements test a condition - if the condition evaluates to true the block of code is run, otherwise the block is skipped. The block is looped through as long as the condition remains true. do-while : An alternative to while loops is the do-while loop. This guarantees that the block will always run at least once switch : switch statements attempt to match some variable with the value it contains. This type of statement works with byte, short, char, and int primitives, along with enumerated types (enums) and - since Java 7 - Strings

What is the difference between a list, set, and queue?

List: The list is an ordered collection, also known as a sequence. Because List is organized, you have complete control over where list items are placed in a List. One thing to note here is that the Java List collection can only contain objects. Elements in a list don't move around. It's based on insertion. Lists are Iterable so they can be looped through -Order ->Lists are ordered and we control the order -Index-> Lists are zero indexed (n.get to retrieve element). -Duplicates-> Can ahve duplicates -Nulls-> Can have nulls Set: Java Set is a collection construct that, by definition, contains unique elements — that is, no duplicates. The Java Set collection can only contain objects, and it is not an ordered list, that means it does not care about the order of the elements. Because Set is an interface, you cannot instantiate it directly. -Order -> -Index-> -Duplicates-> -Nulls-> Queue: Java Queue is a collection that works on FIFO (First In First Out) principle. The elements that are added first will be removed first from the queue. LinkedList and Priority Queue are the most common types of Queue implementations in Java. We can only see/remove elements from the beginning and add an element to the end -Order -> FIFO order. Remove/read from the beginning and add to the end -Index-> Don't have index functionality since we can only access the end element -Duplicates->Yes -Nulls-> Most don't allows nulls (linkedlists are an exception

What is Log4J and why do we use it?

Log4j is a reliable, fast, and flexible logging framework for Java supported by Apache. It's commonly used to record application events, log granular debugging information for developers, and write exception events to files. Why do we need logging? Logging records events that occur during software execution. As users execute programs on the client side, the system accumulates log entries for support teams. In general, it allows for developers to access information about applications to which we do not have direct access. Without logs, we would have no idea of knowing what went wrong when an application crashes, or track and monitor application performance. Also, a logging framework like Log4j is critical because it allows us to use various logging levels and configure a threshold to determine which messages will be recorded in the application log files.

Maven Project Coordinates

Maven Project coordinates identify uniquely a project, a dependency, or a plugins defined in the pom.xml file - these are: -group-id - The group, company, team, organization, project, or other group. for example: "com.revature" -artifact-id - A unique identifier under groupId that represents a single project. for example: "myproject" -version - A specific release of a project. Projects that have been released have a fixed version identifier that refers to a specific version of the project. Projects undergoing active development can use a special identifier that marks a version as a SNAPSHOT. for example: "0.0.1-SNAPSHOT" -packaging- The type of project, defaulting to jar, describing the packaged output produced by a project. A project with packaging jar produces a JAR archive; a project with packaging war produces a web application. READ IN DETAILED VIEW

What is the pom.xml?

Maven project configuration and dependencies are handled via the Project Object Model, defined in the pom.xml file. This file contains information about the project used to build the project, including project dependencies and plugins. A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects. Some other important tags within the pom.xml file include: - <project> - this is the root tag of the file - <modelVersion> - defining which version of the page object model to be used - <name> - name of the project - <properties> - project-specific settings - <dependencies> - this is where you put your Java dependencies you want to use. Each one needs a - <dependency>, which has: -<groupId> ,<artifactId>, <version> - project coordinates - <plugins> - for 3rd party plugins that work with Maven

What is multithreading?

Multithreading in Java is a process of executing multiple threads simultaneously. A thread is a lightweight sub-process, the smallest unit of processing. In Java, multithreading is achieved via the Thread class and/or the Runnable interface. Multiprocessing and multithreading, both are used to achieve multitasking. However, we use multithreading than multiprocessing because threads use a shared memory area. They don't allocate separate memory area so saves memory, and context-switching between the threads takes less time than process. Java Multithreading is mostly used in games, animation, etc. Advantages of Java Multithreading 1) It doesn't block the user because threads are independent and you can perform multiple operations at the same time. 2) You can perform many operations together, so it saves time. 3 3) Threads are independent, so it doesn't affect other threads if an exception occurs in a single thread. -This multithreaded environment can have specific issues that crop up. These are called concurrency issues Let's imagine you have a list of names. You have two threads that want to add to the list of names. The not thread safe version can go like this: Thread 1 reads the list of names [a,b,c] Thread 2 reads the list of names [a,b,c] Thread 1 adds d to its list and writes it back out [a,b,c,d] Thread 2 adds e to its list and writes it back out [a,b,c,e] Because thread 1's read and write operation got interrupted, "d" is not in the final list. If the add name operation was thread safe, this wouldn't have been possible. It would go like this: Thread 1 adds d to the list [a,b,c,d] Thread 2 adds e to the list [a,b,c,d,e]

Can static methods access non static methods or variables?

No, Static methods can only call other static methods directly.

Thread Priorities

Priorities signify which order threads are to be run. The Thread class contains a few static variables for priority: MIN_PRIORITY = 1 NORM_PRIORITY = 5, default MAX_PRIORITY = 10

How do StringBuilder and StringBuffer compare to String? to eachother?

Since Strings are immutable, it becomes inefficient to use them if we are making many new Strings constantly, for example if we are generating new Strings in a for or while loop. Instead, we can use the StringBuilder and StringBuffer classes, both of which are mutable. -StringBuilder contains helpful methods like .append() and .insert() which mutate its internal sequence of characters. -StringBuffer is like StringBuilder but is synchronized, which is useful for multi-threaded. In other words, String Buffers are thread safe which means that you can access the resource in multiple threads without worrying about the final state

Synchronization

Synchronization is the capability to control the access of multiple threads to any shared resource. Synchronized keyword In a multithreaded environment, a race condition occurs when 2 or more threads attempt to access the same resource. Using the synchronized keyword on a piece of logic enforces that only one thread can access the resource at any given time. synchronized blocks or methods can be created using the keyword. Also, one way a class can be "thread-safe" is if all of its methods are synchronized.

Collections Class

The Collections class - not to be confused with the Collection interface - defines many static helper methods which operate on any given collection. Use this class for help with sorting, searching, reversing, or performing other operations on collections.

Unchecked vs Checked Exceptions

The Exception class and all of its subclasses, except for RuntimeException, are known as "checked exceptions". These represent occasions where it is reasonable to anticipate an unexpected condition, like a file not existing when attempting to write to it (which would result in a FileNotFoundException). Checked exceptions are required to be handled or declared by the programmer - otherwise, the code will not compile. RuntimeException is a special type of exception - it, and all of its subclasses - are known as "unchecked exceptions". An unchecked exception is an exception that is not required to be handled or declared like checked exceptions are. Some examples include: ArithmeticException for illegal math operations IndexOutOfBoundsException for if you reference an index that is greater than the length of an array NullPointerException for if you attempt to perform an operation on a reference variable that points to a null value

What is the collections api?

The Java Collections API (Application Programming Interface) provides Java developers with a set of classes and interfaces that makes it easier to work with collections of objects, e.g. lists, maps, stacks etc. Rather than having to write your own collection classes, Java provides these ready-to-use collection classes for you -A predefined architecture of different types of Collections -you can think of it like a family tree related to the Iterable and collections interfaces -Shared behavior of collections include size flexibility, implements/extends the collection interface, they have alot of common methods: .add(), ;remove(), .size() The important interfaces in the Collections API are: -Iterable - guarantees the collection can be iterated over -List - an ordered collection -Set - a collection does not contain duplicates -Queue - a collection that operates on a first-in-first-out (FIFO) basis -Map - contains key/value pairs. Does not extend Iterable.

What are some methods on the Object Super Class?

The Object class, in the java.lang package, sits at the top of the class hierarchy tree. Every class is a descendant, direct or indirect, of the Object class. Every class you use or write inherits the instance methods of Object. You need not use any of these methods, but, if you choose to do so, you may need to override them with code that is specific to your class. The methods inherited from Object that are discussed in this section are: Object class: Object clone() boolean equals(Object o) void finalize() Class<?> getClass() int hashCode() void notify() void notifyAll() String toString() void wait() void wait(long timeout) void wait(long timeout, int nanos) protected Object clone() throws CloneNotSupportedException Creates and returns a copy of this object. public boolean equals(Object obj) Indicates whether some other object is "equal to" this one. protected void finalize() throws Throwable Called by the garbage collector on an object when garbage collection determines that there are no more references to the object public final Class getClass() Returns the runtime class of an object. public int hashCode() Returns a hash code value for the object. public String toString() Returns a string representation of the object.

Why do we use Java?

The advantages of Java are many: -It is platform independent "Write Once, Run Anywhere" -Provides automatic memory management -It has an extensive built-in runtime library -Java has an incredibly rich library and frameworks -Is supported by the Oracle corporation -And has a rich open source community. -JVM compiles Java to bytecode, translates bytecode to machine code • Java is "safe" • Java is free

What is the top level class of exceptions?

The class at the top of the exception class hierarchy is the Throwable class, which is a direct subclass of the Object class. Throwable has two direct subclasses - Exception and Error. The Exception class is used for exception conditions that the application may need to handle

Exception Class Hierarchy

The exception class hierarchy starts with the Throwable class which inherits from Object. Any object which is a Throwable can be "thrown" in a program by the JVM or by the programmer using the throws keyword. The Exception and Error classes both extend Throwable. An Error represents something that went so horribly wrong with your application that you should not attempt to recover from. Some examples of errors are: ExceptionInInitializerError OutOfMemoryError StackOverflowError Exception is a general exception class which provides an abstraction for all exceptions. There are many subclasses of Exception, as shown above.

What is finally? How does it compare to final? Finalize?

The finally block is a block of code that will run after the try block completes, or after a catch block, whichever is appropriate. This isn't required, but it's good for cleanup or if you want some specific thing to happen after your try/catch. Finally is used to place important code, it will be executed whether exception is handled or not. Finalize is a method in the Object class that the garbage collector calls immediately before the object is removed from memory Final is a keyword that has different effects based on where we are using it. It is a non-access modifier that renders thigs unchangeable in our code -Final classes-cannot be extended(no subclasses) -Final Methods-cannot be overridden by child classes -Final Variables- can't be modified after initialization

What is the collections hierarchy?

The hierarchy of the entire collection framework consists of four core interfaces such as Collection, List, Set, Map, and two specialized interfaces named SortedSet and SortedMap for sorting. See https://www.scientecheasy.com/2020/09/collection-hierarchy-in-java.html/ for more detail

What does finalize do? (In Garbage Collection)

The java.lang.Object.finalize() is called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup. -The Object class (the overarching class that all of our classes extend from) has a method called Finalize( ) that the garbage collector calls when the object is removed

How do I deal with exceptions?

There are two ways to handle exceptions: Try/Catch blocks "throws" declaration - tells Java that you know your method throws an Exception, and leaves it to the calling method to handle it. Try/Catch blocks are the way Exceptions (and technically Errors) are handled. (Generally Errors are unrecoverable so you shouldn't try to handle them.) Try block - The code you want to run that might result in an Exception getting thrown. (It may or may not throw an exception) Catch block - At least one catch block (or finally block) is required after a try block. Catch blocks state the exception you're expecting to get thrown, and provides code to run when/if the Exception occurs. Note that the moment the try block encounters the thrown Exception, no more code from the try will be run. It goes straight to the catch. "throws" vs "throw" "throw" will create an Exception or Error object and cause it to proceed down the stack. "throws" is what indicates that a method could cause an exception, but you want a method down the stack to try to resolve it. This only has real use with Checked Exceptions. (Since your code won't compile otherwise). Exceptions and Errors are generally not Final. So they can be extended! This is how you make custom exceptions/errors like we see in the demo.

What kinds of variables can I make?

Variables come in two types in Java: primitives and reference variables. Primitives will hold a simple value. Such as the number 5. Reference variables hold a reference to a location (memory address) in memory where an object is stored.

What are functional Interfaces? Marker interfaces?

What are functional Interfaces? The term Java functional interface was introduced in Java 8. A functional interface in Java is an interface that contains only ONE abstract (unimplemented) method. This one abstract method is what lambdas implement when they are declared. The point of fi is to have one function. Lambdas only implement one functionality A functional interface can contain default and static methods which do have an implementation, in addition to the single unimplemented method. Ex of functional Interfaces: Runnable; Comparator, Executable -The parameter types and return types of the lambda must match the fi method declaration -Java 8 JDK come with many built-in functional interfaces -we can also use functional interfaces as types to which we can assign lambda functions Marker interfaces? A marker interface is an interface that has no methods or constants inside it. It provides run-time type information about objects, so the compiler and JVM have additional information about the object. Serializable is an example of a marker interface.

What are the scopes of a variable?

When a variable is declared in a Java program, it is attached to a specific scope within the program, which determines where the variable resides. The 4 different scopes of a variable in Java are: -Class (static) scope - Static variables declared in a class. The variable is accessible to all objects of that class. (static int i = 0) A change in the value of static variables will be reflected in every object of the class. -Instance (object) scope - The variable is accessible anywhere within the object. Generally these are called field variables. (int i = 0) A change in the value of non-static variables will only be reflected in that specific object. -Method scope - A variable declared in a method can only be accessed in that method. This includes parameters. -Block scope - Variable inside a block of code (defined by curly braces) is only visible in that block. This includes if/else blocks, loops etc. Method scope is essentially a specific form of block scope.

Assert Methods

When building test methods in JUnit, there are specific testing methods that allow you to test the results of your unit tests (your regular methods). These are called "Assert Methods". assertTrue() - test some expression on whether it returns true or not.. n = someMethod(8); assertTrue(n == 8); assertFalse() assertEquals() - tests that the method output is equivalent to some value assertNotEquals() assertThat() - this is a general assertion that you have to define the functionality of. assertThrows() - this can test for exceptions but this requires the use of lambda functions

What are generics? Why use them?

With generics, you can restrict a class to only accept objects of a given type and the compiler will prevent you from using any other type: Ex. List<String> names = new ArrayList<>(); // using a List of Strings only names.add("Alice"); // nice! names.add(new Object()); // now we get a compilation error to stop this - generics save the day! Generics mean parameterized types. The idea is to allow type (Integer, String, ... etc, and user-defined types) to be a parameter to methods, classes, and interfaces. Using Generics, it is possible to create classes that work with different data types. -An entity such as class, interface, or method that operates on a parameterized type is called a generic entity. The Object is the superclass of all other classes and Object reference can refer to any type object. These features lack type safety. Generics add that type safety feature. We will discuss that type of safety feature in later examples. Generics in Java are similar to templates in C++. For example, classes like HashSet, ArrayList, HashMap, etc use generics very well. There are some fundamental differences between the two approaches to generic types.

What are Wrapper classes?

Wrapper classes are classes that let you treat primitives as Objects. This is necessary - for example - for certain methods which only accept objects and not primitives. -It is also necessary for using primitives in your collection (which only take objects) Boxing is the process of converting a primitive to its wrapper class. Java has a feature called auto-boxing which will automatically convert primitives to wrapper classes implicitly. Unboxing is the reverse - converting a wrapper class to its primitive. The classes in java.util package handles only objects and hence wrapper classes help in this case also. Data structures in the Collection framework, such as ArrayList and Vector, store only objects (reference types) and not primitive types. An object is needed to support synchronization in multithreading.

What is an IDE and what is the purpose?

You have to write Java class files. These files have the extension of .java. Your IDE (Eclipse), will handle adding the extension to your classes. All you have to do is provide the name of the class. REMEMBER: IDE stands for integrated development environment- An integrated development environment (IDE) is software for building applications that combines common developer tools into a single graphical user interface (GUI). -After, you've written your class file, it needs to be compiled. Again, this is something that your IDE does for you automatically. It will translate the .java file into bytecode which is the .class file that is understood by the Java Virtual Machine (JVM). Think of the JVM as a program that can read .class files and talks to your operating system and tells it what to do. -Typically, to run a .class file, you would type the following statement in a command line or terminal: java ClassName Of course, what does Eclipse do? It'll do that for you once you click the little run button. See why developers use IDEs like Eclipse? That's the entirety of the process to create a small Java program and running it.

What is method overriding? Overloading?

method overriding? If subclass (child class) has the same method as declared in the parent class, it is known as method overriding in Java. In other words, If a subclass provides the specific implementation of the method that has been declared by one of its parent class, it is known as method overriding. Overloading? If a class has multiple methods having the same name but different in parameters, it is known as Method Overloading. If we have to perform only one operation, having the same name of the methods increases the readability of the program. Suppose you have to perform addition of the given numbers but there can be any number of arguments, if you write the method such as a(int,int) for two parameters, and b(int,int,int) for three parameters then it may be difficult for you as well as other programmers to understand the behavior of the method because its name differs.


Kaugnay na mga set ng pag-aaral

History Flashcards starting with Washington

View Set

IMAE 340 Test 1 Parts A & B Review

View Set

chapter 8 international management

View Set

N325 C1: Intro to Community and MH Nursing

View Set

Ben Kinney's Listing Presentation

View Set

Personal Finance Chapter 3: Money Management Strategy: Financial Statement and Budgeting

View Set