• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Core Java
  • Design Patterns
  • JSP
  • Servlets
  • Building Tools
  • jQuery
  • Spring
  • Hibernate
  • Mongo DB
  • More
    • HTML
    • SCJP
    • AJAX
    • UML
    • Struts
    • J2EE
    • Testing
    • Angular JS

J2EE Reference

  • Home
  • About Us
    • Java Learning Centers
  • Contact Us

Main Content

What is parallel Stream

Parallel streams are streams that allow operations to be executed in parallel, with the goal of making performance faster by dividing the work into smaller, concurrent tasks. Example: [crayon-63db641303105565568943/] In the above example, the sequential stream first sums up all the elements in the numbers list, whereas the parallel stream divides the work of summing up the elements into smaller tasks and executes them concurrently to make the process faster. … [Read More...] about What is parallel Stream

More Posts from this Category

Spring dependency injection with Java configuration

Here we are going to see how to configure dependency injection in spring with java . In the below example we have two classes MyClass and Myclass2 .There is a dependency of MyClass2 in Myclass . So lets understand how to inject the depended class into another using Spring.

Java
1
2
3
4
5
6
7
public class MyClass {
MyClass2 myClass2;
MyClass(MyClass2 myClass2){
this.myClass2=myClass2;
}
}

Java
1
2
3
4
5
6
public class MyClass2 {
MyClass2(){
System.out.println("Initializing MyClass2");
}
}

Below is the configuration […]

Callable and Future Interface

Callable and Future Interface : Callable and Future interface has been introduced in JDK 1.5 under java.util.cocurrent package. Callable interface is used to execute task and is similar to Runnable interface but can return value to caller and is able to throw checked Exception as well .Callable interface has call() method to execute task, computing […]

intern() method of String class

The intern() method in Java is a method of the String class. It returns a canonical representation of a string object. When you call the intern() method, the JVM checks the pool of strings and returns a reference to an existing string object if a matching string is found. If no match is found, the string object is added to the pool and a reference to it is returned. The primary purpose of the … [Read More...] about intern() method of String class

SOLID – Five principles of object-oriented software design

SOLID is an acronym that stands for five principles of object-oriented software design. These principles are intended to make software design more understandable, maintainable, and scalable. The SOLID principles were first introduced by Robert C. Martin in his book "Agile Software Development, Principles, Patterns, and Practices" in 2002. The SOLID principles are: By following these … [Read More...] about SOLID – Five principles of object-oriented software design

Java Coding Best Practices

Here are some best practices for coding in Java: By following these best practices, you can write high-quality code that is easy to read, understand, and maintain. It's also important to remember that best practices are not set in stone and you should always evaluate them in the context of your specific project and use the ones that are most appropriate. … [Read More...] about Java Coding Best Practices

Primary Sidebar

FOLLOW US ONLINE

  • View J2eereference-166104970118637’s profile on Facebook
  • View j2eereference’s profile on Twitter
  • View j2eereference’s profile on LinkedIn

Subscribe by email

Recent posts

  • What is parallel Stream
  • reduce method of the Stream class
  • Difference between the findFirst() and findAny() method
  • intern() method of String class
  • SOLID – Five principles of object-oriented software design
  • Java Coding Best Practices
  • How to use lambda expression effectively
  • Enhanced pseudo-Random Number Generators in java17
  • How to use Foreign-Memory Access API
  • Pattern Matching for instanceof
  • Text Blocks – Feature added in Java17
  • Record – The new feature added in java 17
  • What is Sealed Class
  • Features added in Java 17
  • Java Buzzwords

Footer

Core Java
Design Patterns
JSP
Servlets
HTML
Building Tools
AJAX
SCJP
jQuery
Testing
Spring
UML
Struts
Java Centers
Java Training
Home
About Us
Contact Us
Copyright © j2eereference.com. All right reserved.