Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khachornchit/java-review
This repository reviews Java Core and Java 8 functionality, i.e. lambdas function, functional interfaces, method references, and collections, collections improvements, and how come the benefit of using lambda enables functional programming, readable and concise code, easier-to-use APIs and libraries, enables support for parallel processing.
https://github.com/khachornchit/java-review
java java-8 javaee maven spring-mvc tomcat-server
Last synced: 4 days ago
JSON representation
This repository reviews Java Core and Java 8 functionality, i.e. lambdas function, functional interfaces, method references, and collections, collections improvements, and how come the benefit of using lambda enables functional programming, readable and concise code, easier-to-use APIs and libraries, enables support for parallel processing.
- Host: GitHub
- URL: https://github.com/khachornchit/java-review
- Owner: khachornchit
- License: mit
- Created: 2019-02-23T07:17:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-17T14:25:34.000Z (12 months ago)
- Last Synced: 2024-05-11T21:48:36.264Z (6 months ago)
- Topics: java, java-8, javaee, maven, spring-mvc, tomcat-server
- Language: Java
- Homepage:
- Size: 495 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Java Review
## Core Java Review
This repository serves as a comprehensive review guide for core Java concepts, offering a structured overview of
fundamental topics essential for Java development. It covers essential data types, string manipulation, conditional
statements (if, else, switch), and looping constructs. Additionally, the repository delves into array usage, static
keyword applications, string builder functionality, and techniques for string comparison. Core principles of
collections, including Sets and Lists, are explained, followed by a detailed exploration of HashMaps and LinkedHashMaps.
Object-oriented programming (OOP) principles are covered, emphasizing encapsulation, inheritance, and polymorphism. The
repository concludes with a study of generics, providing a solid foundation for Java developers or those seeking a
refresher on key language features.## Java8 Review
## Lambda Expressions
Advantage: Lambda expressions enable concise and expressive syntax for writing anonymous functions. This promotes
functional programming paradigms in Java.Lambda Benefit
* Enables functional programming
* Readable and concise code
* Easier to use APIs and libraries
* Enables support for parallel processing## Functional Interfaces
Advantage: Functional interfaces, interfaces with a single abstract method, can be used in conjunction with lambda
expressions, promoting a functional programming style.## Stream API
Advantage: Streams provide a declarative and parallel approach to processing collections, enhancing code readability and
performance.## Default Methods
Advantage: Default methods allow interfaces to have method implementations, aiding in backward compatibility when adding
new methods to interfaces.## Date and Time API
Advantage: While not specifically designed for microservices, Java 8's features, especially lambda expressions and the
Streams API, can contribute to writing more modular and scalable code.## Method References
Advantage: Simplicity and conciseness when calling a static method.
## Method References
* Reference to a Static Method
* Reference to an Instance Method of a Particular Object
* Reference to an Instance Method of an Arbitrary Object of a Particular Type
* Reference to a Constructor## Optional
* Avoiding Null Checks with Optional
* Chaining Optional Methods
* Default Values with orElse
* Throwing Exceptions with orElseThrow## Streams
Advantages of Streams:
* Concise and Declarative Syntax: Streams provide a concise and declarative way to express complex data manipulations.
The code is often more readable and expressive.
* Parallelism: Streams can easily be parallelized, allowing for efficient parallel processing of data. This is
particularly useful for modern multicore processors.
* No Side Effects: Stream operations do not modify the underlying data source. They are designed to be non-mutating,
promoting functional programming principles.
* Pipeline of Operations: Stream operations can be chained together to form a pipeline, enabling a sequence of
operations to be applied to a collection in a single statement.## Nashorn (JavaScript Engine)