Fannie Mae

¡Supera tus tareas y exámenes ahora con Quizwiz!

How would you set up a Spring Boot application

Spring boot application annotated class with a main class running the application, setting up controllers, repos, and any service logic along with models + utility classes.

" How would you prevent an auto wiring of one application to the next

Using a @Qualifier annotation?

" Docker exp?​

a little

How would you find out if the tenth digit of a number was even or odd?

convert it to a string and access the char at the 10th index, if modulo 2!= 0 then its odd, else even.

What Collections and Collection have you used?​

ArrayList, Linked List, HashSet, HashTable, Queue, Deque, Stack

Whether you know how to use bash?​

gitbash, yes

What happens during a Hash collision in Java?​

is a situation where two or more key objects produce the same final hash value and hence point to the same bucket location or array index.

" How many times does finally run?

once

What happens if you want to create an object and there is no constructor?

there is a default no args constructor

What does synchronized mean?

thread-safe which means only one thread can have lock of synchronized method and use it, other threads have to wait till the lock releases and anyone of them acquire that lock

" How to reverse a string in java?​

use StringBuilder and the reverse method

" How would you find a number in a string?​

you could use regex. or set the string equal to a char and use the isDigit()

How would you have the different layers of your spring boot application

Database, Service, Controller

How would you find the letter that occurred most in a string?

Make a hashtable of occurances of letters and iterate through the string, whatever is the max occurances in the hashtable

"(1) file has a list of employee names​ task: separate the duplicates​ output: new file unique employee name

" sql distinct

What is the difference between Final, Finally, and Finalize?

"the final keyword is used to declare that a field cannot be reassigned the .finalize() method can be overridden on an Object to run some functionality prior to being garbage collected. Finally is called at the end of a try/catch block and happens once regardless of what occurs in the try/catch block.

" What is a constructor?

A method used to initalize an object of that type

" Explain CI and CD (pipelines)?​

"Continually integrate all of the changes made to your codebase into something that can be tested Continuous Delivery is a state of being ready and able to release any version at any time on any platform, whereas Continuous Deployment is actually deploying. are designed for businesses that want to improve applications frequently and require a reliable delivery process.

What are the main features that were added in Java 8?​

"Functional Interfaces and Lambda Expressions. forEach() method in Iterable interface. Optional class, default and static methods in Interfaces. Method references. Java Stream API for Bulk Data Operations on Collections. Java Date Time API. Collection API improvements.

What is the difference between an interface and an abstract class?

"Interface can have only abstract methods. Abstract class can have abstract, non-abstract methods, default and static methods also. Variables declared in a Java interface are by default static and final. An abstract class may contain non-final variables - can have final, non final, static and non-static

How do you spin up a thread?

"Thread thread = new Thread(); thread.start();

How would you use a Hash in java?​

Hashing means using some function or algorithm to map object data to some representative integer value. This so-called hash code (or simply hash) can then be used as a way to narrow down our search when looking for the item in the map.

What is an instance variable?

Instance variables are declared in a class, but outside a method, constructor or any block.

How is polymorphism implemented?

Method overloading, operator overloading, method overriding, and using a casted class as another class.

What AWS services have you used?​

RDS, EC2, Elastic Beanstalk, CodeBuild + CodePipeline, S3

Exp with web servers?​

Servlets

Jenkins exp?

Some

What is the difference between Callable and Runnable?​

The Runnable interface is a functional interface and has a single run() method which doesn't accept any parameters and does not return any values.The Callable interface is a generic interface containing a single call() method - which returns a generic value V:

- If a client has an issue with their application or Jenkins pipeline, how would you resolve that?

Troubleshoot the issue, which section of the pipeline / deployment is failing and make sure it was resolved.

- When would you consider an issue resolved?

When the application or function works as expected in the user story/use case.

Are there multiple ways to configure a bean in spring application

XML, Java Class Configuration, Annotation / component scanning

- Challenges you faced leading a team

Yes

- Scrum meetings experience

Yes

" Are you more comfortable with Frontend or Backend?​

por qué no los dos lmao

" What is the difference between span and paragraph in HTML?

span is an inline element, p defines a paragraph.

- What is your experience with Jenkins?

A tiny bit

"(3) certification application: the app has a database and server​ pull data from app 1​ generate excel and send that to the app owner​ the app owner checks the file​ remove or update information​ reply to email and sends to operation team

" "COPY [Table Name] TO '[File Name]' DELIMITER ',' CSV HEADER;

" What is the difference between Callable and Runnable?

"Both Callable and Runnable interface are used to encapsulate a task supposed to be executed by another thread. Callable can throw checked Exception, Runnable cannot. A Runnable object does not return a result whereas a Callable object returns a result.

What is the speed of a binary search?​

"O(log n) - average case O(1) - best case

What are the advantages of Java over Python, and in what situation would you use one or the other?

"Python programs are generally expected to run slower than Java programs, but they also take much less time to develop. Because of the run-time typing, Python's run time must work harder than Java's. For example, when evaluating the expression a+b, it must first inspect the objects a and b to find out their type, which is not known at compile time. It then invokes the appropriate addition operation, which may be an overloaded user-defined method. Java, on the other hand, can perform an efficient integer or floating point addition, but requires variable declarations for a and b, and does not allow overloading of the + operator for instances of user-defined classes.

What is a try/catch block?

"The try statement allows you to define a block of code to be tested for errors while it is being executed. The catch statement allows you to define a block of code to be executed, if an error occurs in the try block. The try and catch keywords come in pairs:

What goes on in the background of a website if, for example, you type google.com in the browser?​

"You enter a URL into a web browser The browser looks up the IP address for the domain name via DNS The browser sends a HTTP request to the server The server sends back a HTTP response The browser begins rendering the HTML The browser sends requests for additional objects embedded in HTML (images, css, JavaScript) and repeats steps 3-5. Once the page is loaded, the browser sends further async requests as needed.

What happens after a user submits a url request to a website?​

"You enter a URL into a web browser The browser looks up the IP address for the domain name via DNS The browser sends a HTTP request to the server The server sends back a HTTP response The browser begins rendering the HTML The browser sends requests for additional objects embedded in HTML (images, css, JavaScript) and repeats steps 3-5. Once the page is loaded, the browser sends further async requests as needed.

When would you use Node JS

"building fast and scalable network applications. JSON APIs based Applications Single Page Applications

" What are the different kinds of memory in Java?

"heap and stack, heap is where obejcts are stored and where garbage collection is ran Stack memory is used for the execution of a thread. They contain method-specific values that are short-lived and references to other objects in the heap that is getting referred from the method.

What is the difference between a hashmap and a hashtable?​

1. HashMap is non synchronized. It is not-thread safe and can't be shared between many threads without proper synchronization code whereas Hashtable is synchronized. It is thread-safe and can be shared with many threads. 2. HashMap allows one null key and multiple null values whereas Hashtable doesn't allow any null key or value. 3. HashMap is generally preferred over HashTable if thread synchronization is not needed

What is deadlocking in multi-threading?

A deadlock is a condition where a program cannot access a resource it needs to continue. When an active application hits a deadlock, it may "hang" or become unresponsive. If one thread depends on the other thread to continue, and vis versa, it will deadlock.

What is a race condition? (This, for the record, is the only one I absolutely could not answer as I have never heard the term before, but apparently it has to do with deadlocking in multi-threading.)

A race condition occurs when a software program depends on the timing of one or more processes to function correctly. If a thread runs or finishes at an unexpected time, it may cause unpredictable behavior, such as incorrect output or a program deadlock.

What are the 4 main principles of OOP (Object Orient Programming), and what do they mean?​ (What is encapsulation?, What is polymorphism?)

Abstraction, Polymorphism, Inheritance, Encapsulation. Abstraction is OOP concept of "showing" only essential attributes and "hiding" unnecessary information, like internal implementation details. Polymorphism is the OOP concept of the ability of an object to take on many forms. Inheritance is The OOP mechanism (in java) by which one class is allow to inherit the features(fields and methods) of another class. Encapsulation is The OOP mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit.

Difference between array and arraylist?​

Array is a fixed length data structure whereas ArrayList is a variable length Collection class. We cannot change length of array once created in Java but ArrayList can be changed.

" What is the difference between an ArrayList and LinkedList and when would you use each?​

ArrayList provides constant time for search operation, so it is better to use ArrayList if searching is more frequent operation than add and remove operation. The LinkedList provides constant time for add and remove operations. So it is better to use LinkedList for manipulation.

What java data structures have you used?​

ArrayList, Linked List, HashSet, HashTable, Queue, Deque, Stack

What kinds of Design Patterns have you used?

Design patterns are solutions to general problems that software developers faced during software development. factory and singleton

" How to find the 3rd largest number in a large array?​

For lower time complexity: Could divide the array in three parts (as equal as possible) that do not overlap, and use an effective searching algorithm, such as binary search, to find the largest value in each. Then compare the three largest values and output the largest of the three -------- (did not google or code this so please provide a better answer if needed... concidering that binary search has a complexity of log(n) this would have a time complexity of log(n)/3... but we can remove the coeficient leaving it back at log(n), it mught just be helpful ti mention that it is slightly more effective than log(n) complexity)

" In which situations would you use an interface over an abstract class?

If you need to provide additional behavior for your classes, then interfaces are the way to go. Interfaces are also used for dependency injection (a.k.a. DI/IoC) and make it easier to mock derived classes while testing.

What kinds of Interfaces are there in Java?​

Marker interface is an interface without any methods or fields declaration, means it is an empty interface. a Functional Interface is an interface with just one abstract method declared in it. Runnable interface is an example of a Functional Interface. It has only run() method declared in it.

What are class and id in HTML?

Selectors. a class selector is a name preceded by a full stop (".") and an ID selector is a name preceded by a hash character ("#").

" What is the difference between spring boot and spring core

Spring core is manual set up of all configuration, Spriong boot provides an opinionated configuration. Spring boot also includes a servlet container, and can start up very quickly compared to spring core.

What does static mean?

The field or method belongs to the class, and not an instance of the class, when using this keyword.

When would you use a Factory?​

We can abstract away complex creation logic and use a simple factory method call:

(2) query database and read status of failure generate an incident number and create an incident ticket

store the stack trace for the specific error in a logging file, add the time that the error occured in the file upon creation.


Conjuntos de estudio relacionados

Prep U's - Chapter 18 - Anxiety and Panic Disorders: Nursing Care of Persons with Anxiety and Panic

View Set

Introduction to Property Insurance

View Set

Chapter 9 - Market Data Approach

View Set

MOLB 4440 Microbial Genetics Final Review

View Set