13 Dec 2019

feedDZone Java Zone

Hashing in Java Vs. C++

Learn more about the differences and similarities between hashing in Java and C++.

Java and C++ are somewhat syntactically similarly languages that have diverged over time. Java was loosely inspired by C++, but initially didn't adopt C++'s template structures, nor did it require C++'s header/content file separation, and of course, it used the JVM and compiled to bytecode rather than machine code.

13 Dec 2019 2:14pm GMT

JVM Advent Calendar: Project Loom

Here's a detailed look at Project Loom.

Why Loom?

One of the drivers behind streams in Java 8 was concurrent programming.

You may also like: Project Loom: Java With a Stronger Fiber

13 Dec 2019 2:14pm GMT

An Implementation of Spring Boot With Spring Data JPA

Get started building a Spring Boot application with Spring Data JPA.

This guide includes my interest in how you can handle complex CRUD operations such a simple way with Spring Data JPA and using native queries in case of needs.

13 Dec 2019 2:14pm GMT

12 Dec 2019

feedDZone Java Zone

Deploying Java EE Apps on Azure (Part 1)

Learn more about deploying Java EE apps on Azure.

There is a multitude of options for cloud-based application development ranging from traditional IaaS (Infrastructure-as-a-Service), PaaS (Platform-as-a-Service), and CaaS (Containers-as-a-Service) all the way to Kubernetes and serverless. Think of it as a spectrum rather than a "one-size-fits-all" model, with each option having owned its pros and cons. Ultimately, every scenario is unique and the final choice is driven by requirements - but its always good to know that you have "choices" at your disposal!

You may also like: Java in Azure Functions

12 Dec 2019 2:30pm GMT

Matching Patterns With Java

Learn more about matching patterns in Java.

If you're using Java, there's a high chance you've seen its pattern matching before. The String#matches(String) method internally uses the Pattern type, which comprises more complex functionality:

A Pattern is created by compiling a regular expression. The pattern matches any input string and can optionally find capturing groups, which isolate certain parts of your string data.

12 Dec 2019 2:30pm GMT

JVM Advent Calendar: Hidden Treasures of Eclipse Collections

There are a few hidden treasures within Eclipse collections.

Eclipse Collections is an open-source Java Collections framework. In this blog, I am going to demonstrate five lesser-known features of the framework. I published a similar blog in last year's Java Advent Calendar. Please refer to the resources at the end of the blog for more information about the framework.

You may also like: The Best of Java Collections [Tutorials]


12 Dec 2019 2:30pm GMT

11 Dec 2019

feedDZone Java Zone

Understanding Types of References in Java

Learn more about the different types of references in Java.

There are four types of references in Java. And for each of them, the garbage collector behaves a little bit differently.

Below, I will try to explain each type of reference's characteristics and possible use cases, specifically strong, weak, soft, and phantom references.

11 Dec 2019 3:21pm GMT

Tutorial: Reactive Spring Boot, Part 8: Kotlin RSocket Server

Learn more about building reactive Spring Boot apps and the Kotin RSocket server.

This is the eighth part of our tutorial showing how to build a Reactive application using Spring Boot, Kotlin, Java, and JavaFX. The original inspiration was a 70-minute live demo.

11 Dec 2019 2:52pm GMT

This Week in Spring: Releases, R2DBC, Tutorials, and More

Check out all the latest happenings in Spring!

Hi, Spring fans! Welcome to another installment of This Week in Spring! I just wrapped up my appearance in Brisbane, Australia, where I have been for the epic YOW! conference. Truly, one of my all-time favorite shows on the planet. I feel like an imposter in the ranks of the other speakers. I cannot recommend this show enough.

I'm just about to board my fight back to San Francisco, and we've got a ton of stuff to get to, so let's press on!

11 Dec 2019 2:52pm GMT

JVM Advent Calendar: Smalltalk With the GraalVM

Learn more about Smalltalk with GraalVM.

Today, we're going back to the future to do some Smalltalk with the GraalVM.

You may also like: Learning to Use GraalVM

Introduction

The Java HotSpot Performance Engine is one of the most sophisticated process virtual machines (VMs) available and used by millions of Java developers every day. If we go back in the early history of HotSpot, not many people may know that HotSpot was initially built by the same team that worked on Strongtalk, a strongly-typed Smalltalk environment as its name suggests.

11 Dec 2019 2:52pm GMT

10 Dec 2019

feedDZone Java Zone

Java Advent Calendar: Take Control of Your Slow Producers

snailTake control of your slow producers... with READ-BEHIND-CACHE!

In our connected world, we often use data from APIs that we don't own or don't have access to improve. If all things go right, their performance is good and everybody's happy. But too many times we have to use APIs that have less than optimal latency.

Of course, the answer is to cache that data. But a cache that you don't know when it gets stale is a dangerous thing, so that's not a proper solution.

10 Dec 2019 1:39pm GMT

Reading EDI Data in Java

Learn more about reading EDI data in this Java tutorial.

These days, most Java developers expect to deal with JSON to exchange data with other systems and businesses. However, what happens when JSON is not an option? It's easy to forget that there are other formats for data exchange, some of which are more difficult to handle. One such format is known as EDI. EDI itself comes in several flavors - for example, X12 and EDIFACT - so code to read it may not always be "one size fits all."

You may also like: [DZone Refcard] Understanding Stream Processing

On the surface, reading EDI data seems to be a simple endeavor. A developer may see a sample file and attempt to read it using the basic string parsing APIs available in his or her programming language's standard library. Unfortunately, this may not always work and it becomes difficult to do data validation and handle the structure of the document effectively.

10 Dec 2019 1:39pm GMT

Java Annotated Monthly — December 2019

Many of us are winding down for the end of the year. Or, more likely, desperately trying to hit deadlines before vacations, public holidays, or school breaks. This month's Java Annotated Monthly is not too full to take away from your busy schedules and designed (as usual) for you to skim over the topics and dive into just the ones that interest you. Good luck with the tail end of 2019!

Java News

Java Tutorials & Tips

Languages, Frameworks, Libraries, and Technologies

Culture & Community

And Finally

A chance to catch up on the other IntelliJ IDEA blog posts from this month.

10 Dec 2019 1:39pm GMT

09 Dec 2019

feedDZone Java Zone

Your Guide to Java Streams [Tutorials and Articles]

In this edition of "Best of DZone," we've compiled our best tutorials and articles on one of the most popular APIs in Java, Streams. Whether you're a beginner just looking to bring in some elements of functional programming into a Java application, or a Streams vet, we've got your back!

Before we begin, we'd like need to thank those who were a part of this article. DZone has and continues to be a community powered by contributors like you who are eager and passionate to share what they know with the rest of the world.

09 Dec 2019 8:45pm GMT

Using Spring Data JPA Specification

Spring Data JPA was created primarily to allow easy query creation with query generation by method name. However, sometimes, we need to create complex queries and cannot take advantage of a query generator.

The Spring Data JPA provides a repository programming model that starts with an interface per managed domain object. Defining these interfaces serves two purposes: first, by extending the JpaRepository, we get a bunch of generic CRUD methods, like save, findAll, delete, and so on. Second, this will allow the Spring Data JPA repository infrastructure to scan the classpath for this interface and create a Spring bean for it. A typical repository interface will look something like this:

09 Dec 2019 5:13pm GMT

Inheritance vs Delegation in Java

Let's look at the difference between the inheritance and delegation concepts.

In this article, we will look at the difference between the inheritance and delegation concepts. Or, to put it better, why I prefer delegation and why I want to emphasize this rarely-used feature in Java.

You may also like: Problems With Inheritance in Java

The Challenge

The challenge we face today is quite common in the field of graphic user interfaces like desktop- or web-apps. Java is widely used as the development language for both worlds, and it does not matter if we are in the classic swing, JavaFX, or the field of web frameworks like Vaadin. Explicitly, I've opted for a pseudo-class model in core Java, as I'd like to look at the design patterns here without any technical details.

09 Dec 2019 2:01pm GMT

10 Nov 2011

feedPlanetJava

OSDir.com - Java: Red Hat's top secret Java Killer/Successor: The Ceylon Project

From the Ceylon dept.:

Gavin King of Red Hat/Hibernate/Seam fame recently unveiled the top secret project that he has been working on over the past two years, a new language and SDK designed to replace Java in the enterprise. The project came out of hiding without much fanfare or publicity at QCon Beijing in a keynote titled "The Ceylon Project - the next generation of Java language?".

10 Nov 2011 6:01am GMT

OSDir.com - Java: Oracle Introduces New Java Specification Requests to Evolve Java Community Process

From the Yet Another dept.:

To further its commitment to the Java Community Process (JCP), Oracle has submitted the first of two Java Specification Requests (JSRs) to update and revitalize the JCP.

10 Nov 2011 6:01am GMT

OSDir.com - Java: No copied Java code or weapons of mass destruction found in Android

From the Fact Checking dept.:

ZDNET: Sometimes the sheer wrongness of what is posted on the web leaves us speechless. Especially when it's picked up and repeated as gospel by otherwise reputable sites like Engadget. "Google copied Oracle's Java code, pasted in a new license, and shipped it," they reported this morning.



Sorry, but that just isn't true.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Java SE 7 Released

From the Grande dept.:

Oracle today announced the availability of Java Platform, Standard Edition 7 (Java SE 7), the first release of the Java platform under Oracle stewardship.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Java SE 7 Passes JCP

From the Jitters dept.:

The next edition of Java has been approved by a Java Community Process executive committee, but not without some acrimony.

10 Nov 2011 6:01am GMT

OSDir.com - Java: JDK 7 RC1 Released

From the JDK dept.:

After an initial round of testing we've declared build 147 to be the first Release Candidate of JDK 7.



There are only thirteen changes in this build. Over half of them are administrivial updates that don't affect the actual code; the remainder are true showstoppers, including several hard VM crashes and a JIT correctness bug identified by an Eclipse unit test.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Google Files Sizzling Answer to Oracle's Amended Java Complaint

From the Counter dept.:

Google has filed its answer to Oracle's amended complaint and its memorandum opposing Oracle's Motion to Dismiss. And we find out why Google didn't just roll over and pay Oracle for a license. Oracle asked in its motion to dismiss that the counterclaims alleging that Oracle's patents are invalid be dismissed. So Google explains more thoroughly why it believes they are in fact invalid. First, Google asserts:



Each of the Patents-in-Suit is invalid under 35 U.S.C. § 101 because one or more claims are directed to abstract ideas or other non-statutory subject matter.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache loses Java showdown vote to Oracle

From the Dis Harmony dept.:

The Apache Software Foundation - one of tech's most influential open-source groups - is closer to quitting Java's governing body after losing a stand-off vote against Oracle on Java.



The Reg has learned that with 75 per cent of qualifying Java Community Process (JCP) members having voted on whether to ratify Oracle's proposed roadmap for Java 7 and 8, Oracle's plan has been accepted.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache Software Foundation Resigns from Java Community Process

From the So Long dept.:

The Apache Software Foundation has resigned its seat on the Java SE/EE Executive Committee. Apache has served on the EC for the past 10 years, winning the JCP "Member of the Year" award 4 times, and recently was ratified for another term with support from 95% of the voting community. Further, the project communities of the ASF, home to Apache Tomcat, Ant, Xerces, Geronimo, Velocity and nearly a 100 mainstay java components have implemented countless JSRs and serve on and contribute to many of the JCPs technical expert groups.



We'd like to provide some explanation to the community as to why we're taking this significant step.



The recent Java SE 7 vote was the last chance for the JCP EC to demonstrate that the EC has any intent to defend the JCP as an open specification process, and demonstrate that the letter and spirit of the law matter. To sum up the issues at stake in the vote, we believe that while continuing to fail to uphold their responsibilities under the JSPA, Oracle provided the EC with a Java SE 7 specification request and license that are self-contradictory, severely restrict distribution of independent implementations of the spec, and most importantly, prohibit the distribution of independent open source implementations of the spec. Oracle has refused to answer any reasonable and responsible questions from the EC regarding these problems.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache Discontinues Independent Java Implementation 'Harmony'

From the DisHarmony dept.:

After the resignation of Apache from the Java SE/EE Executive Committee, the time has now come for Harmony to be added to the Apache Attic. Harmony was 'the project to produce an open source cleanroom implementation of Java.' An open vote was taken within the Project Management Committee, which resulted in a 20-2 majority to discontinue development.

10 Nov 2011 6:01am GMT

Javable: YourKit Java Profiler 7.0 released

The major update to YourKit Java Profiler has been released. Version 7.0 includes

10 Nov 2011 6:01am GMT

Javable: Sun phases out mobile Java

Sun will gradually phase out mobile Java (Java Micro Edition) and move respective services to Standard Edition. "We're trying to converge

10 Nov 2011 6:01am GMT

Javable: Google Android SDK is available

The development kit and API for Google mobile platform, Android, has been released.

10 Nov 2011 6:01am GMT

Javable: Consumer JRE Early Access

Sun has started an early access program to Java SE 6 Update N (formerly known as the "Consumer

10 Nov 2011 6:01am GMT

Javable: NetBeans 6.0 released

New version of pure Java IDE has been released, with support for many new

10 Nov 2011 6:01am GMT

Javable: Happy New Year!

We wish a Happy New Year to all our readers and contributers. Hope to see you all in 2008.

10 Nov 2011 6:01am GMT