SkillStorm Interview Prep Flashcards

1
Q

Length

Array - Find length of Array

len = my________._________; // gets length

A

len = myArray.length;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Length

ArrayList - Find length of ArrayList

len = my________.________(); // gets length

A

len = myList.size(); // gets length

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Get

Array - Get item at index 3

x = my_________[]; //gets item at index 3

A

x = myArray[3]; // gets item at index 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Get

ArrayList - Get item at index 9

x = my_________.________( ); // gets item at index 9

A

x = myList.get(9); // gets item at index 9

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Insert

Array - Put an item at index 4 equal to 7

my_______[] = __; // sets item at index 4 equal to 7

A

myArray[4] = 7; // sets item at index 4 equal to 7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Insert

ArrayList - Put a 7 at the end of the list

my________.________(__); // adds 7 to the end of the list

ArrayList - Put a 7 at the third position

my________.________(__,__); // adds 7 at index 3

A

myList.add(7); // adds 7 to end of list

myList.add(2, 7); // adds 7 to index 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Create

Array - Create different types of arrays

int[] my_______ = _______ int[];

int[] my_______ = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};

Dog[] ______ = new _______[__];

A

int[] myArray = new int[10];

int[] myArray = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};

Dog[] dogs = new Dog[25];

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Create

ArrayList - Make several types of ArrayList

ArrayList my________ = new Array________<>( );

Array_________ cats = ________ Array________( );

Array________ _________ = new Array________(25);

A

ArrayList myList = new ArrayList<>();

ArrayList cats = new ArrayList();

ArrayList cats = new ArrayList(25);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Array v ArrayList

Array__ArrayList

Length: _______ Length _________ Length

Data Types: _________, Objects ________, Generics

Performance: Get and Insert in __(_) Get and Insert in __(_)

A

Array v ArrayList

Array__ArrayList

Length: Fixed Length Variable Length

Data Types: Primitives, Objects Objects, Generics

Performance: Get and Insert in O(1) Get and Insert in O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

OOPS Concepts:

What is an Object?

Real World ________, ________, and Performs __________

Example: Human ==> Properties ==> ________, Color, _________ etc.

Human ==> Tasks Performed ==> _________, Run, ________, Write etc.

A

Entity, Properties and Performs Tasks

Name, Color, Height

Walk, Run, Read, Write

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Class

What is a Class? ________ of an __________

It is a ___________ that an ________ follows

If Human is the Object then __________ can be a Class

Student ==> ________ (variable) ==> ________, __________, __________ etc.

Student ==> ________ => Read, and Write

A

Instance, Object

Blueprint, Object

Student

Properties, Name, Roll Number, DOJ

Tasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the Four Pillars of Object Oriented Programming?

____________

____________

____________

____________

A

Abstraction

Polymorphism

Inheritance

Encapsulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Abstraction I

Abstraction refers to only showing ________ _________ and keeping everything else ___________

If car is the class, we can know car.pushGas() is a _______ that will make the car go _________ even if we don’t understand the ________ that makes it do so.

If classes are _________, then one change creates a ________ effect that causes many more _________.

A

essential, details, hidden

method, forward, code

entangled, ripple, changes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Abstraction II

Creating an __________ through which _________ can interact ensures that each piece can be __________ developed.

Abstraction allows the program to be worked on ________ and prevents it from becoming _________ and _________.

Determine specific points of __________ that can act as an __________ between _________, and only worry about the implementation when _________ it.

A

interface, classes, individually

incrementally, entangled, (and) complex

contact, interface (between) classes, coding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Polymorphism

Polymorphism describes _________ that are able to take on many ________.

There are two types polymorphism: _________ and _________.

A

methods, forms

static, dynamic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Polymorphism II

continuing Dynamic Polymorphism…

The implementation of the subclass that the _________ is an instance that __________ that of the superclass.

Car and sportsCar both have .drive(miles) ________ but the .drive(miles) on Car class __________ Car.gas 0.04 miles and the .drive(miles) on the sportsCar Class decreases Car.gas by _.__ miles yet that all changes when you make an instance of sportscar called mySportsCar.drive() which will _________ Car.gas by 0.02 but an instance of ________.__________() will decrease the Car.gas by 0.04 miles

A

object, overrides

methods, decreases, 0.02, decrease, myCar.drive, decrease, myCar.drive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Polymorphism III

continuing Dynamic Polymorphism…

Dynamic Polymorphism works because the form of the _________ is decided based on where in the class ________ it is called.

The implementation of a method ____ that will be used is determined _________ as the proram is run

A

method, hierarchy

signature, dynamically

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Polymorphism IV

Static Polymorphism cont…

Static Polymorphism occurs during the _________ rather than _________.

Static Polymorphism refers to when multiple methods with the same _________ but different ________ are defined in the ________ class.

How do you differentiate methods of the same name? Different order of ____, Different ________ of parameters and Different ________ of parameters. This is known as method ______. Despite the methods having the same name, their ____ are different due to their ____ arguments.

A

compile-time, runtime

name, arguments, same

parameters, order, types, overloading, signatures, different

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Polymorphism V

Static Polymorphism cont…

Method overloading can cause ____ if you do not keep in mind which _____ you need for which _____.

Using the ______ argument may not cause an error if it matches that of another form of the ____, which can cause issues.

Overall, _____ allows methods to take on many different ____.

When utilizing polymorphism and method ____, be sure that you’re calling the correct ____ of the method.

A

trouble, parameters, implementation

incorrect, method

Polymorphism, forms

overloading, form

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Inheritance

____ is the principle that allows classes to derive from other _________.

Subclass inherits from Superclass

____________ ====> ___________.

Game Example:

________ Weapon ====> ________ Sword (weapon.damageType = “sharp”)

OR

class _________ ====> ________ Club (weapon.damageType = “blunt”)

A

Inheritance, classes

Superclass, Subclass

class, class

OR

Sword, class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Inheritance II

Hierarchy:

Class hierarchies created will have many more _______ with many more ________ in each layer.

Class hierarchy acts as a ____ of classes with different ______ to one another

A

layers, classes

web (of) , relationships

22
Q

Inheritance III

Access Modifiers:

Access modifiers change which classes have ________ to other classes, __________, or __________.

The three type of access modifiers are _________, _________, and _________.

Public members can be accessed from anywhere both inside of the class ____ it is defined in as well as ____ in the rest of the ____.

A

access, methods (or) attributes

Public, Private, (and) Protected

hierarchy, outside, program

23
Q

Inheritance IV

Access Modifiers cont. - Private:

Private ____ can only be accessed from within the ____ class that the member is ____.

This allows you to create multiple ____ members of the same name in different ____ so that they do not ____ with one another.

A

members, same, defined

private, locations, conflict

24
Q

Inheritance V

Accessing Modifiers cont. - Protected:

Protected members can be accessed within the ____ it is ____, as well as any ____ of that class.

This essentially makes protected members ____ to the hierarchy in which they are ____.

A

class, defined, subclasses

private, defined

25
Q

Encapsulation I

Encapsulation refers to ____ data with methods that can operate on that ____ within a ____.

Essentially, it is the idea of ____ data within a class, preventing anything ____ that class from directly ____ with it.

This does not mean that ____ of other classes cannot interact at all with the ____ of another ____.

A

bundling, data, class

hiding, outside, interacting

members, attributes, object

26
Q

Encapsulation II

Methods:

Members of other classes can interact with the attributes of another object through its ____.

Remember, methods are the ____ defined within the ____.

Methods: Getting ====> Retrieving ____

Methods: Setting ====> ____ Information

Setting methods also allow the programmer to easily keep track of ____ that depend on one another i.e. Method 1 ==> ____ 2.

A

methods

functions, class

Information

Changing

attributes, Method

27
Q

Encapsulation III

Setter Method

If you have Class Player1 with attributes Player1.maxHealth and Player1.currentHealth and a method Player.levelUp(), when the player levels up, you want their ____ health to ____. When that happens you want the ____ health to match their max health. Instead of having to increase each type of health separately, you can ____ a ____ setting method.

maxHealth ____ method allows both attributes (maxHealth, currentHealth) to be changed ____ as they should, rather than requiring you to ____ change them.

A

max, increase, current, create, maxHealth

setting, simultaneously, individually

28
Q

Encapsulation IV

Setter Method cont.:

The following setting method ensures that the change to the ____ is within the ____ that is allowed:

def setCurrentHealth(____):

____.currentHealth = newHealth

if player.____ > player.____

player.currentHealth = ____.maxHealth

A

attribute, boundary

def setCurrentHealth(newHealth):

if player.currentHealth > player.maxHealth

player.currentHealth = player.maxHealth

29
Q

Encapsulation V

Getter Method - Chess Example

You may also want some attributes to be “____ only” from the outside

To do this, you would define a ____ method but not a ____ method

The ____ could only be referenced, not ____.

Chess Example

You have a Class Piece with attributes ____.rank and ____.file and you want to move this piece so you create a new ____ called Piece.move()

A

read

getter, setter

variable, changed

Piece, Piece, method

30
Q

Encapsulation VI

Getter Method cont.:

Piece.move() which allows validation by checking whether the new rank and file is ____, if it’s on the ____ still, if it is occupied by a piece of the ____ color and finally if it doesn’t put the King in a check position.

Information Hiding:

It’s generally best to not allow ____ classes to directly ____ an object’s ____.

This is very important when working on ____ and ____ programs.

A

empty, board, opposite

Information Hiding:

external, edit, attributes

large, complex

31
Q

Encapsulation VII

Information Hiding cont.:

Each piece should not have access to or rely on the ____ workings of other sections of ____.

____ hiding, or keeping the ____ of one class hidden from external classes, helps you keep control of your ____ and prevent it from becoming too ____.

Encapsulation is a vital principle in ____ because it keeps the programmer in control of access to ____ and prevents the program from ending up in a ____ or unwanted state.

A

inner, code

Information, data, program, complicated

Object Oriented Programming, data, strange

32
Q
  1. What does SQL stand for?
  2. What type of Database is it?
  3. Who developed it and where and when was it developed?
  4. What does SEQUEL stand for?
  5. What is SQL?
  6. Is it a declarative or a procedural language?
A
  1. Structured Query Language
  2. Relational Database
  3. Chamberlain and Boyce developed it at IBM in the 1970s
  4. Structured English QUEry Language
  5. A powerful language that uses English Sentences
  6. Declarative
33
Q

Data is a collection of ____, ____, and ____ from different sources.

Database is a ____ where data is ____ in a certain ____.

Types of Databases:

____, ____, ____, ____, ____, ____, ____, ____

Most popular databases is ____ and ____.

A few popular Databases are ____, my____, ____SQL, ____, SQL _____

A

facts, figures, and values

location, stored, format

Distributed Database, Centralized Database, Graph Database, Object Oriented Database, Operational Database, NoSQL Database, Cloud Database, Relational Database

Relational (and) NoSQL

mongoDB, SQL, postgres, Oracle, Server

34
Q

Simple Database Queries:

-To make a Database

____ database RajsLibrary

-To delete a Database

____ database RajsLibrary

A

create

drop

35
Q

Table is a collection of data in ____ form.

Table consists of ____ and ____.

Intersecting of a column and row is a ____.

Table can have unlimited ____ but numbered amount of ____.

Rows are ____.

Each column is an ____ of the data i.e. ____, ____, Age, Measurement etc.

A

tabular

columns (and) rows

Cell

rows, columns

Tuples

attribute ID, Name

36
Q
  1. What is a table constraint? specified by the ____ when creating the ____.
  2. When must table constraints be decided?
  3. What must you do if you want to change the constraints?
  4. What is the list of the Normal Constraints?
A
  1. A restriction specified by the user when creating the table?
  2. Before the table is created.
  3. You have to delete the table and create a new table with the desired restraints.
  4. Not Null, Check Default, Foreign Key, Primary Key, Unique, and Index
37
Q

What will the following queries do?

  1. Select * from RajsLibrary
  2. Select ID from RajsLibrary
  3. SELECT FName FROM Student WHERE City = “Clearwater”
A
  1. This will produce the whole table
  2. This will produce only the column with the ID attribute
  3. This will produce all rows with the FName attribute where the city attribute is Clearwater
38
Q
  • ->AND Query
  • >This operator displays a record if ____ the conditions separated by AND are ____.
  • ->OR Query
  • >This operator displays a record if ____ of the conditions separated by OR is ____.
  • ->NOT Query
  • >This operator displays a record if the ____(s) are NOT TRUE
  • ->INSERT INTO Query
  • >If we want to insert any new ____ or ____ into a table then we can use the INSERT INTO query
A

ALL, TRUE

ANY, TRUE

CONDITION(S)

RECORD (or) DATA

39
Q

–> AGGREGATE FUNCTIONS
===>COUNT Function
==>This function returns the number of ____ that match specified ____
===>AVERAGE Function
==>This function returns the ____ value of a numeric ____
===>SUM Function
==>This ____ returns the ____ of a numeric column
===>MIN Function
==>This function returns the ____ value of the ____ column

A

rows, criteria

average, column

function, sum

smallest, selected

40
Q

–>GROUP BY
—>Used in SQL to arrange ___ data into groups with the help of some ____.
–>HAVING
—>Use to place ____ where we need to decide which group will be the part of ____ result-set
–>ORDER BY
—>This keyword is used to sort the ____-____ in ascending or ____ order.
–>NULL VALUES
==>IS NULL is used to test the ____ values
==>>IS NOT NULL is used to test for ____-____ values
–>UPDATE
—>The Update command is used to modify ____ in a table

A

identical, functions

conditions, final

result-set, descending

empty

non-empty

rows

41
Q

>DELETE

  • –>The SQL DELETE command is used to delete ____ that are no longer ____ from the database tables
  • ->IN OPERATOR
  • –>IN operator is used to specify multiple values inside the ____ clause. It acts as short for multiple ____
  • ->BETWEEN OPERATOR
  • –>BETWEEN operator will select a particular ____ within the specified ____.
A

rows, required

WHERE, OR

value, range

42
Q

BIG-O Rules

  1. If you have steps in your ____, you ____ them: O(a + b)
  2. ____ constants.
  3. Different ____ ==> ____ variables
  4. Drop non-_____ terms
A
  1. algorithm, add
  2. Drop
  3. inputs, different
  4. dominant
43
Q

HashMap:

  • Allows you to store ____-____ associations
  • HashMap is similar to a ____.
  • HashMaps allows us to convert a large ____ into a shorter ____-____ value that will represent the ____ string
  • In Java, every object has a method ____ int ____( ) that will return a hash value for a given ____
A

Key-Value

Dictionary

string, fixed-length, original

public, hashcode(), object

44
Q

Stacks & Queues

Both are ____ structures

Both have various ____

Stacks:

Last In First Out (____)

Queue:

____ In First ____ (FIFO)

A

linear

sizes

LIFO

First, Out

45
Q
  • Each box in a ____ can be considered an object considering we have made a ____ called “Box” for each ____ in our LinkedList.
  • Int Data represents whatever ____ is in each box and that can be anything from ____, ____, etc.
  • A regular LinkedList goes in ____ direction and the ____ will be all the way to the ____ like how we read.
  • head.____ would give the data in the first ____ all the way to the left
  • head.next.data would give us the ____ in the ____ box from the ____
A

LinkedList, class, node

data, integers, strings

one, head, left

data, box

data, second, left

46
Q

-> Abstraction
–> Showing only ____ parts —> hiding the ____
===> Android Application ==> AP
-> Polymorphism
–> Performing the same ____ (task means method) in different ways
Examples:
1. ____ ( )
2. Add (___ a, ____ b)
draw Polygon( )
1. Draw a ____
2. ____ rectangle
3. Draw ____
Note: All three are ____

A

essential, implementation

tasks

  1. Add ()

int, int

square

Draw

triangle

polygons

47
Q

We can implement the ____ with:

  1. Method ____ -> Can be achieved with Compile-Time
  2. ____ Overriding -> Can be achieved with ____-____.
A

polymorphism

Overloading

Method, Run-Time

48
Q

Encapsulation is the mechanism of wrapping up ____ and code acting on the ____ together as a single ____.

Encapsulation is achieved by ____ the variables of a class as ____ and then providing the public setter and ____ methods to modify and ____ the variables values.

An ____ in java is a ____ of a class which contains static constants and ____ methods and enables ____ inheritance and helps in achieving ____ coupling and lastly it provides 100% of ____

A

data, methods, unit

declaring, private, getter, view

interface, blueprint, abstract, multiple, loose, abstraction

49
Q

An ____ class is a template definition to methods and variables of a ____ that contains ___ or more abstracted _____.

It can provide from ____ to ____% of abstraction

Abstract Classes must be declared with an ____ keyword, can have abstract and ____-abstract methods, cannot be ____, and can have ____ and static methods.

Run-Time Polymorphism or ____ Polymorphism is resolved during ____ time.

Method ___ is an example of run ____ polymorphism

An ____ method is called through the ____ variable of a Superclass

A

abstract, class, one, methods

0 (to) 100

abstract, non, instantiated, constructor

dynamic, run

Overriding, time

overridden, reference

50
Q

Rules of Overloading

  1. Overriding method ____ list must match the ____ method
  2. The ____ type must be the same or ____ of overridden method
  3. Access level cannot be more ____ than the overridden method
A

argument, overridden

return, subtype

restrictive

51
Q

Compile Time Polymorphism or ____ Polymorphism is resolved during ____ time

Overloading is an example of ____ time polymorphism

  1. Overloaded methods must have a different ____ list.
  2. It can have different ____ types if ____ list is ____.
  3. It can throw different ____.
  4. It can have different ___ modifiers
A

Static, compiler

compile

  1. argument
  2. return, argument, different
  3. exceptions
  4. access
52
Q

Object Oriented Programming

  1. ____ Up approach
  2. Divided into ____
  3. Has ____ modifiers
  4. Objects can move & communicate with each other through ____ functions
  5. More ____
  6. Supports ____

Procedural Programming

  1. Top ____ approach
  2. Divided into ____
  3. Doesn’t have ____ modifiers
  4. Data can move freely from ____ to ____ in the system
  5. Less ____
  6. Does not support ____
A
  1. Bottom
  2. objects
  3. Access
  4. member
  5. secure
  6. overloading
  7. Down
  8. functions
  9. Access
  10. function (to) function,
  11. secure
  12. overloading