Good Article : String concatenation in Java 9

Bram Yeh
1 min readAug 22, 2018

There is a great article that describes the differences of String concatenation in Java 8 and 9.

Before reading, what do you think the log in Java 9?

public class Alice { 
String[] wonders = new String[]{“ cats”, “ eat”, “ bats”};
int wonderIndex = 0;
@Override public String toString() {
return wonders[wonderIndex++];
}
public static void main(String[] args) {
Alice alice = new Alice();
System.out.println(“Do” + alice + alice + alice + ‘?’);
}
}

You will get the answer and understand why after reading it.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Bram Yeh
Bram Yeh

Written by Bram Yeh

Lead Android & iOS Mobile Engineer at Yahoo (Verizon Media) Taiwan https://www.linkedin.com/in/hanruyeh/

No responses yet

Write a response