Final Prepare Flashcards

1
Q

What is the object-oriented relationship between BufferedReader and Reader?

A

BufferedReader IS-A Reader

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

class

A

The blueprint from which individual objects are created

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

Object

A

The root of the class hierarchy. Every class has the object as a superclass. All objects, including arrays, implement the methods of this class

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

instance variable

A

Variables within a class but outside any method. These variables are initialized when the class is instantiated.

Instance variables can be accessed from inside any method, constructor or block of that particular class

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

Subclass

A

Inherits all the public and protected members of its parent, no matter what package the subclass is in.

If the subclass is in the same package as its parent, it also inherits the package-private members of parent

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

Primitive vs reference types

A

Primitive types are basic types of data

  1. byte, short, int, long, float, double, char
  2. primitive variables store primitive value

Reference types are instantiable class as well as arrays

  1. String, Scanner, Random, Die, int[], String[]
  2. Reference variables store addresses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Java API

A
  1. A list of all classes that are part of the Java development kit (JDK)
  2. Includes all Java packages, classes, and interfaces, along with their methods, fields
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Package

A

Basics of inheritance in Java

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

Public

A

Can be accessed from any other class

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

Private

A
  • The most restrictive access level
  • Class and interfaces cannot be private
  • Can only access using getter/setter
  • A strategy to encapsulate data from the outside world
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Polymorphism

A

Deals with how the program decides which methods it should use, depending on what type of thing it has. That is the ability to treat objects of different types in a similar manner.

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

Inheritance

A

When a ‘class’ derives from an existing ‘class’. For example, say we have a Person class, and when our student class inherits from Person class, meaning that student class carries all the public behavior and attributes that a person has.

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

Interfaces

A

Used as the parameter type of one or more methods in the class that solve the problem

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

Overloading

A

Deals with the idea of having two or more methods in the same class with the same name but different arguments

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

Override

A

A method with same name and same parameter exist in both superclass and subclass. Method override can be used to rewrites the functionality of the method is given by superclass, and customize it for its own usage

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

Static

A

A member of the class that isn’t associated with an instance of a class. Instead, the member belongs to the class itself. In other words, you don’t need to create an instance in order to use the variable

17
Q

Protocol

A
  • The messages that are understood by the object
  • The arguments that these messages may be supplied with
  • The types of results that these messages return
  • The invariants that are preserved despite modifications to the state of an object
  • The exceptional situations that will be required to be handled by clients to the object
18
Q

HTTP

A

Hyper Text Transfer Protocol, it allows World Wide Web users to transfer information like image, text. It’s used to access HTML pages