Java Flashcards
What is Java?
It is an object-oriented, class-based, platform independent programming language that produces software for multiple platforms
What is Object Oriented Programming (OOP)?
Programming focused on creating objects that contain both data and methods. Key features include: encapsulation, abstraction, polymorphism, and inheritance
What is encapsulation in Java?
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
Explain polymorphism in Java.
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
What is method overloading?
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
Explain method overriding.
The ability of a method in a child class to give its own implementation of a method derived from the parent class.
What is inheritance in Java?
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
What is abstraction in Java?
The process of hiding implementation details from the user, only showing the functionality
Main features added to Java 8?
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.