Week 1 Flashcards
Infrastructure as a Service (IaaS)
a self-service model for managing remote data center infrastructures.
Platform as a Service (PaaS)
allows organizations to build, run and manage applications without the IT infrastructure. This makes it easier and faster to develop, test and deploy applications.
Software as a Service (SaaS)
replaces the traditional on-device software with software that is licensed on a subscription basis. It is centrally hosted in the cloud. A good example is Salesforce.com.
AWS Region Define.
a geographical location with a collection of availability zones mapped to physical data centers in that region.
AWS Availability Zone
a logical data center in a region available for use by any AWS customer.
AMI (Amazon Machine Image)
provides the information required to launch an instance. Think of it as a template for an EC2 Instance.
Security groups
a virtual firewall for your EC2 instances to control incoming and outgoing traffic based on their IP address.
___________ rules enable you to filter traffic based on protocols and port numbers.
Security group
Amazon Elastic Compute Cloud (Amazon EC2)
a web service that provides secure, resizable compute capacity in the cloud.
The “Elastic” nature of the service allows developers to
instantly scale to meet spikes in traffic or demand.
a virtual server in the cloud.
An Instance
What is Java? Why Java?
Java is a high-level OOP language with rich API Libraries.
Write once run anywhere, static types, compiled languages.
What is JRE?
Java runtime environment. contains JVM.
What is JVM?
Java virtual machine. Runs compiled JAva code.
What is JDK?
Java developer kit. Has a compiler. debugger. Contains JRE and JVM.
What is an object/class?
Class is a blueprint for an object.
What is the root class from which every class extends?
The ‘Object’ Class… (This is a class called object.)
What are the primitive data types in Java?
boolean.
byte.
short.
int.
long.
float.
double.
char.
Where are the strings stored?
In the string pool in the heap?
What is a heap in Java?
a chunk of memory which is shared among all threads.
What is an immutable object?
An object whose internal state remains constant after it has been entirely created.
What are the benefits of keeping String immutable in java?
caching, security, synchronization, and performance.
In this heap type, the root node is greater than it’s children.
Max-Heap.
In this heap type, the root node is the smallest among all the other keys present in the heap.
Min-heap.
Does stack memory use LIFO or FIFO structure?
LIFO
A part of computer’s memory where temporary variables, which are created by all functions you do, are stored.
Java Stack Memory.
A block of code which only runs when it is called.
method.
What is the difference between…
public static int x = 4;
public int y = 2;
In the first declaration, the variable x = 4 will carry till the end of the program.
In the second declaration, the variable will not exist at the end of the current function. It is a local variable.
What data types are supported in switch statements?
String.
int.
char.
short.
byte.
enums.
How to pass multiple values with a single parameter into a method?
Use varargs.
Vararg.
a method that takes a variable number of arguments.
Where in Java memory are objects stored?
The Heap.
What methods are available in the object class?
.clone
.hashcode
.equals
.toString
what does ‘==’ mean?
tests to see if two reference variables refer to the exact same instance of an object.
what does ‘.equals()’ do?
tests to see if two objects being compared to each other are equivalent. (does not have to be the exact same instance of an object)
What are the 4 pillars of OOP?
Abstraction.
Polymorphism.
Inheritance.
Encapsulation.
What is abstraction?
Hiding implementation details through a higher-level construct, thereby decreasing coupling and increasing cohesion.
What is polymorphism?
allowing the implementation of a behavior to vary, whether between subclasses or within the same class.
What is ‘super()’ used for?
to invoke immediate parent class constructor.
What is inheritance?
Receiving state and behavior from other classes, thereby reducing boiler plate and duplicate code and allowing for hierarchies of classes.
What is encapulation?
Restricting access to data members by using access modifier and getter/setter methods.
Bash is a ____ that interprets ____ commands like “ls” that interact with the ___.
shell; linux; filesystem.
How do you compile java code contained in the file helloWorld.java and then run it on the command line?
javac HelloWorld.java, then java HelloWorld
Method Overriding is…
Same method signature but different implementation.
keyword to show inheritance in java?
extends.
Static methods can be called without instantiating the class first. T/F?
True.
The main() method must be static, in order to be executed by the JVM. T/F?
True.
A final class can not be instantiated. T/F?
False.
A final class can be instantiated. T/F?
True.
The keyword super() calls the constructor of the….
parent class.
the keyword static means…
something belongs to the class and is globally available to all instances.
Access modifier public define.
can be accessed anywhere in the program.
Access modifier private define.
can only be accessed within the same class.
Access modifier default define.
can only be accessed from within the same package.
Access modifier protected define.
can be accessed within the same package or through inheritance by subclasses.
Java supports multiple inheritances of classes. T/F?
False.
What is the purpose of the java compiler?
to transfer java code into instructions usable by the JVM.
What is the purpose of the java compiler?
to transfer java code into instructions usable by the JVM.
Both String and StringBuffer are mutable. T/F?
False.
What is git?
A version control tool.
How do you create a new branch in git?
git checkout -b
By default, in a git repository, origin refers to:
The remote repository that the local repository was cloned from.
What is the correct series of commands to:
1) Go to the “main” branch
2) See the current state of the files in the branch
3) Make a change
4) Update the remote repository
git checkout main;
git status;
git commit;
git push;
git checkout main;
Got to the “main” branch.
git status;
See the current state of the files in the branch.
git commit;
Make a change.