0

I'm watching this video:

https://vimeo.com/131394616

and in minute 51:51 a method loadTag(String tag, /* other args */) is called with the following syntax:

loadTag(
  tag: "java",
  /* other args */
);

is this simply a feature of his IDE? Now that we're on the subject, is there a way to achieve named parameter passing in Java (8)?

Edit: note that I'm my follow-up question about a named parameter passing idiom for Java is not my main concern, but the actual syntax which used in the video which does not compile in my IDE.

gdiazc
  • 2,108
  • 4
  • 19
  • 30

1 Answers1

2

In the video you can later see the parameters go back to normal form, so it's some sort of IDE plugin/tool/macro (looks like IntelliJ IDEA, which has a lot of these) to display it in that form.

I can definitely see the advantage in a demonstration situation like that, so while it's not available in the current Java version, who knows what future will bring.

Kayaman
  • 72,141
  • 5
  • 83
  • 121