Java Flashcards

1
Q

What is Java?

A

It is an object-oriented, class-based, platform independent programming language that produces software for multiple platforms

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

What is Object Oriented Programming (OOP)?

A

Programming focused on creating objects that contain both data and methods. Key features include: encapsulation, abstraction, polymorphism, and inheritance

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

What is encapsulation in Java?

A

The mechanism of wrapping data (variables) and code acting on the data (methods) as a single unit. Ex. A class: bundles data and methods under a single unit

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

Explain polymorphism in Java.

A

Directly translated means, “many forms” and describes how an object can occur in different forms. Ex: Java allows for defining one interface with multiple implementations. This is seen in method overloading and overriding

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

What is method overloading?

A

When two or more methods in the same class have the same name but different parameters. Ex no-args constructors and custom method of the same name

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

Explain method overriding.

A

The ability of a method in a child class to give its own implementation of a method derived from the parent class.

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

What is inheritance in Java?

A

Allows the creation of a new class from an existing class. The new child class will inherit all public and private methods from the parent class

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

What is abstraction in Java?

A

The process of hiding implementation details from the user, only showing the functionality

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

Main features added to Java 8?

A

Java 8 is a major update to the programming language which introduced a significant upgrade to the functional programming called the Lambda Expressions. Java 8 also gets a new and improved Date/Time API, an enhanced JavaScript engine, new streaming API. Concurrent accumulators, secure random generation, and much more.

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