Revature Interview Questions

Ace your homework & exams now with Quizwiz!

1NF, 2NF, 3NF

1st normal form: no duplicate items and only one "thing" per column, it also needs a primary key 2nd normal form: must be in first normal form and no column is dependent on only part of a multi-part primary key 3rd normal form: must be in second normal form and nothing can be dependent on something that is dependent on the primary key unless on it is dependent on the primary key too

Difference between == and .equals()?

== checks if both objects point to the same memory location whereas .equals() evaluates to the comparison of values in the objects.

What is Http?

A browser sends an HTTP request to the web server A web server receives the request The server runs an application to process the request The server returns an HTTP response (output) to the browser The browser receives the response.

What is an object, and a class?

A class is a collection of objects, its provides a definition for state and behavior. A object is an instance of class, it is an entity that has an identity for state and behavior.

Predicate<In> Java 8

A functional interface, used whenever you want to check some boolean condition. Predicate<T> -> test() -> returns boolean In order to perform predicate joining you have to define two predicates and use and (was &&), or (was ||), negate with the two predicates to achieve boolean result.

My experience with R

A programming language for statistical use and graphics. I used data wrangling and analyzing techniques in R to make a model that predicts NBA player's salaries.

What is a singleton?

A singleton class can only has one instance at a time.

What is API?

APIs are mechanisms that enable two software components to communicate with each other using a set of definitions and protocols. For example, the weather bureau's software system contains daily weather data. The weather app on your phone "talks" to this system via APIs and shows you daily weather updates on your phone.

Aggression in Java

Aggregation in Java is a relationship between two classes that is best described as a "has-a" Example: Student has a id.

What is the Agile retrospective?

An Agile retrospective is a meeting of the software development team of a company held at the end of the project to discuss the successes and the failures throughout the project.

What is the difference between an ArrayList and an array

An array is fixed to a specific index, while arrayList are not.

Difference between ArrayList and Vector

An arrayList is not synchronized, and a vector is not, that what makes an arayList faster than a vector.

Lambda Expression

Anonymous function (without name, return type and access modifier, and having one lambda (->) symbol public void add(int a, int b){S.o.p(a+b)} ------------------------------------------ Reduced to (a+b) -> S.o.p(a+b)

AutoWiring?

AutoWiring in Springboot is the process of dependency injection. It allows us to use the functionality of beans (objects) in other class or methods. It's kind of like inheriting but without the extra code.

Boilerplate?

Boilerplate is code that is repeated throughout a program. You can help reduce this with the use of lombok, which allows us to use annotations for code that's considered boilerplate for example @NoArgsconstructor creates a no argument constructor. @AllArgsconstructor creates an all arguments constructor.

Commands in SQL

CREATE TABLE table_name ( column1 data_type(size), column2 data_type(size)); SELECT student_FN,student_LN, student_grade FROM students WHERE student_id = 11; INSERT into table_name (col1, col2) VALUES (val1, val2); UPDATE table_name SET col2= 'example1' col3= 'example2' WHERE col1 = 1;

What is CSS used for?

CSS is used to define style aspects of the webpage Example: h1 { color: red } we are making our main header, a red text.

What are the different scopes in java?

Class Scope - any variable declared inside a class but outside a method Function Scope - a variable that is declared in parameter of a function Block Scope - a variable that is declared in a block, a block is represented by {}.

Comparable and comparator

Comparable sorts the collection by a single element compareTo() Comparator sorts the collection by multiple elements compare()

CSS box model

Content - The content of the box, where text and images appear Padding - Clears an area around the content. The padding is transparent Border - A border that goes around the padding and content Margin - Clears an area outside the border. The margin is transparent

5 SQL Languages?

Data Manipulation Language (DML):- Keywords: SELECT, INSERT, UPDATE, and DELETE- These are our crud methods. Data Query Language (DQL):-Keywords: SELECT (only)- Whether SELECT exists in DML or DQL depends on the database you're using. Data Definition Language (DDL):-Keywords: CREATE, ALTER, TRUNCATE, and DROP- These keywords deal with our schema. Data Control Language (DCL):-Keywords: GRANT and REVOKE Transaction Control Language (TCL):-Keywords: COMMIT, SAVEPOINT, and ROLLBACK

what are the 4 OOP pillars?

Encapsulation starts off with defining a class and using private variables. These variables are accessed by public functions such as getters and setters. Data Abstraction - I look at like using a cell phone. You use a cell phone for the basic functionalities like calling and texting but you are not aware of all the signals that being sent/received behind the scenes. This is data abstraction, the process of exposing only essential information to the user. An interface is by default abstract, it allows us to form multiple inheritance, because a class can only extend to one class, a class can implement many interfaces. Polymorphism- Can be done by overloading or overriding. Overloading is the process of applying multiple arguments to a function. Overriding is the process of using the same function but implementing a different functionality. Inheritance- Inheritance is the process of a parent class extending to a child class, so that the child class can receive all the functionality of the parent. The keyword used in inheritance is extends when dealing with class to class. When dealing with a class and an interface you use the keyword implements.

Difference between static and final

Final makes a variable constant, immutable. Static allows a variable to be shared amongst the class.

What is a HTML frame?

Frames can divide the html page into separate windows. Each frame is a different html document loaded using 'src' attribute. The drawbacks of using frames is that it is not compatible with smaller screen devices because screen isn't large enough to split up, also in frequent cases the back button is disenabled.

Garbage collection

Garbage collection is a automatic memory management process. Objects are created in the heap, which are garbage collected when they are unused to free up memory space.

Exception Handling in Java

Handling means that the risky code is inside a try/catch block Declaring means that the type of exception to be thrown is listed in the method signature with the throws keyword. This is also called "ducking" the exception - you let the code which calls the method deal with it. Checked exceptions (like FileNotFound) are required to be handled (try-catch) or declared (throws) by the programmer - otherwise, the code will not compile, but unchecked is not required to be handled or declared (like ArithmeticException, illegal math operator)

Are you familiar with Hashmap

HashMap allows us to store key-value pairs. That is the difference between HashMap and HashSet. Both doesn't allow duplicates, in their own way becuase their structure are different. HashMap doesn't allow duplicate keys but values can be duplicated, HashSet doesn't allow duplicate values. A Map is useful if you have to access and manipulate values on the basis of a key.

Functional Interface, @FunctionInterface

Have only one abstract method. Functional interface is used to provide reference to lambda expressions FunctionalInterface<datatype> object = i -> i*i

Hibernate?

Hibernate's primary feature is mapping from Java classes to database tables, and mapping from Java data types to SQL data types. Hibernate also provides data query and retrieval facilities. It generates SQL calls and relieves the developer from the manual handling and object conversion of the result set.

User interface?

How a user controls or communications a application.

What is HTML

HyperText Markup Language: language used to tell a web browser how to make a page look. It has formatting tags such as <h1> and <body>. You can also format content in paragraphs using <p> Separate paragraphs by <br>, break line tag You can also list in html, <ol> and <ul>.

What database did you use

I used PostgreSQL it was very reliable and gave me great performance.

What are the different joins?

INNER JOIN - Returns all rows when there is at least one match in BOTH tables LEFT JOIN- Return all rows from the left table, and the matched rows from the right table RIGHT JOIN- Return all rows from the right table, and the matched rows from the left table FULL JOIN- Return all rows when there is a match in ONE of the tables SELF JOIN- A table being joined on itself. Example a table of a foreign key to itself like a table of people with a foreign key of their spouse Cross Join - Produces a cartesian product (rows of first table multiplied by rows in the second table)

Other tests I have run

In Angular, Jasmine is used as the testing framework and Karma as the test runner.

What are clustered indexes?

Indexes are used to speed the query time to improve performance. Think of it as an index in a book, which makes it easy for you to navigate to a particular page or chapter. Clustered index maintains the order of the data in a table.

HTTP Codes

Informational responses (100-199) Successful responses (200-299) Redirection messages (300-399) Client error responses (400-499) Server error responses (500-599)

Service (Angular)

Its basically a dependency.

JDBC

JDBC is a part of Java API, that provides SQL statements, for developers to use to create database applications JDBC Process 1. Connect to a database 2. Create a statement for query 3. Form a result set 4. Close the connection

What is the difference between JDK, JVM, & JRE?

JDK, provides us with Java development tools, as well as JRE, but JRE also contain Java libraries such as java.lang and java.util, and the JVM allows us to run execute our java code on a operating system.

JSON?

JSON is a data interchange format that uses human-readable text to store and transmit data objects It has common use in web applications.

What is the difference between List and Set in collections API?

List allows duplicate values and set does not.

Types of constructors

No args constructor- if we don't define a constructor with no arguments then Java creates a default constructor for us. This has to be done in order to use define a object. All args constructor - A constructor that has parameters used to initialize fields of the class with our own values.

Pipes in Angular

Pipes are used in angular for

What is the difference between primary key, unique key, and foreign key.

Primary key - identifies each row in a table. For example, in the student table, student_id can be the primary key used to access the details of student. student_id will always be different for different students. Can't be null. Unique key - set of one or more fields that collectively identify a database record. This should not include the primary key. Unique key can have one null value. For example, student_name and batch_number can be collectively used to identify top students in last 3 years. Foreign key - a column that references the column of another table to establish the relationship between two tables. Most of the times, the primary key in one table is the foreign key in another. For example, the book table can have student_id as a foreign key that will determine the details of the books a student has taken.

Why Java 8?

Significant reason for introducing Java 8 is for less boilerplate in the code through functional programming.

Spring Data JPA

Spring Data JPA integrates JPA into the Spring stack and its repositories reduces boilerplate code. For example Crud Repo (create, read, update, delete) FindBy (perform select data query statements) Save (perform updating data query)

What is Spring Boot?

Spring boot is mostly about auto-configuration, which is done by component scanning, which a component classes is annotated by @Component. It also involve scanning of @Configuration annotation and initialize some extra beans.​ @SpringBoot Application- enables auto configuration, component scanning, extra bean registry all in one. With @RestControllers we take care of mapping request data to defined request handler methods. Once response body is generated from the handler method, it converts it to JSON or XML response. This is taking away the use of servers in our application, which in conclusion Spring Boot helps developers create applications that just run on their own without a server.

How does Spring handle exceptions

Spring provides the @ExceptionHandler to handle exceptions in specific handler classes or handler methods. Spring configuration will detect this annotation and register the method as an exception handler. The method will handle the exception and its subclasses passed to the annotation.

What are the types of memory in Java

Stack - where all methods and variable live Heap - where all objects live, (Strings are apart of the String Pool which is also apart of the heap)

Strings

Strings are immutable. But you can use StringBuffer and StringBuilder to mutate them. StringBuffer is synchronous thread safe. It means two threads can't call the methods of StringBuffer simultaneously. StringBuilder is asynchronous thread safe. It means two threads can call the methods of StringBuilder simultaneously.

Common directives used in Angular

Structural Directives: -ng If : allows us to add or remove DOM elements based upon Boolean -ngFor: used to repeat a part of HTML template Attribute Directives- -ngClass: adding or removing the CSS classes on an HTML element. ​ ngStyle:allows us to dynamically change the style of HTML element

Explain what the ORDER BY and GROUP BY clauses do

The ORDER BY clause is used to sort the data in ascending or descending order, based on one or more columns. The GROUP BY clause groups rows that have the same values into summary rows.

What is the difference between WHERE and HAVING?

The WHERE clause is used to filter records from a result. The filter occurs before any groupings are made. The HAVING clause is used to filter variables from a group.

Why do we make the main method static?

The main() method is static so that JVM can invoke it without instantiating the class.

JavaScript Object vs JSON

They both contain properties and values, but JavaScript Object can contain methods, JSON cannot.

SQL triggers?

Triggers are stored procedures that are invoked when some event like insert, update or delete happens in the database on a particular table.

Junit Are Unit tests mandatory

Unit test are very beneficial because if you follow the Test-Driven-Development process the first you establish are test and you construct your code to pass unit tests, this make finding errors easier for developers to solve faster. There are a few annotations for JUnit testing, the one that I have used the most is @Test, which declares a method as a test method.

Pipes (Angular)

Used to transform values. Returns a desired formatted output like dates.

Agile vs Waterfall?

Waterfall is based off strict sequence, phase by phase. No skipping or overlapping. This is great in terms of organizing and documenting, but makes the software development process very slow. Agile is performing the entire SDLC on each phase simultaneously. This speeds of the SDLC process and allows more adaptation to possible changes which is in contrast to Waterfall because if we are doing Waterfall, developers are not going to be fond to change an entire phase which could be a couple phases ago to implement a change. Also Agile provides testing on each phase which debugs errors faster rather than Waterfall waiting to the end of the project to implement testing.

The difference between POST and PUT

When you use POST, you are create a resource and instructing the server to create a URI (Uniform Resource Identifier). When using PUT, you are creating a resource for a known URI, so if a resource doesn't exist it will create it, if it does PUT will update it.

Method Referencing

When you use a functional interface to reference a method, using the class_name :: method_name then calling the abstract method in the functional interface

Wrapper classes

Wrapper classes are classes that let you treat primitives as Objects

Do you see the HTTP verbs

You do not see the HTTP verbs in your url, but if you use the GET http verb for instance the content that you are implemented will be refreshed onto the url when the webpage is refreshed, the POST http verb doesn't allow that. That's why it's useful to use POST over GET in instances like password entry.

What files make up a component? What is the "spec" file used for?

html - Logic scss - styles **spec - unit testing ts - TypeScript

What are the primitive types in JavaScript

number, string, boolean, undefined, null, NaN (Not a number)

What are access modifiers

public - can be accessed from anywhere private - can only be accessed inside the class protected - not accessible to the world, but to package, class, and subclass default - modifier that is present if the others aren't.


Related study sets

Counseling for Related Professions

View Set

Lesson 7: Aspects of Voice Usage

View Set

Real Estate Brokerage and the Law of Agency (Chapter 7...IMPORTANT!!)

View Set