I was reading this question
. From the answers of that question I got sugaring concept and some examples of sugaring in java 7
.
I am interested to know that is there any novel sugaring features which are added in java 8
and not present in java 7
?
Asked
Active
Viewed 195 times
0
-
3http://openjdk.java.net/projects/jdk8/features – Leri Feb 27 '14 at 07:20
-
i read question which is refereed in my question , from the answers of that previous question i did not get novel sugaring features which are added in java 8 , i commented on that question and someone suggest to put my question if I want answers. – swapnil7 Feb 27 '14 at 07:59
1 Answers
1
You may find the answer here which discusses all the new features of Java 8 including the syntactic sugar lambda expression:-
- Lambda expressions
- Remove the Permanent Generation
- Small VM
- Parallel Array Sorting
- Bulk Data Operations for Collections
- Define a standard API for Base64 encoding and decoding
- New Date & Time API
- Provide stronger Password-Based-Encryption (PBE) algorithm implementations in the SunJCE provider
Also check Java 7 Features Which Enable Java 8

Rahul Tripathi
- 168,305
- 31
- 280
- 331
-
2Read this. Lambdas are NOT just syntactic sugar, http://stackoverflow.com/questions/15221659/java-8-lambda-expression-and-first-class-values – Stephen C Feb 27 '14 at 07:47
-
@StephenC:- Not trying to argure or contradict but this answer says that it is:- http://programmers.stackexchange.com/questions/195081/is-a-lambda-expression-something-more-than-an-anonymous-inner-class-with-a-singl – Rahul Tripathi Feb 27 '14 at 07:55
-
@StephenC:- And I somewhat agree with the comment made by Phillip in that question:- `When a language is turing-complete, every added feature could theoretically be described as "syntactic sugar".` – Rahul Tripathi Feb 27 '14 at 07:57
-
You need to read the Answers more carefully. For example, that one you linked to says *"**mostly** syntactic sugar"*. Which is essentially what I'm saying, and what the link I provided says. – Stephen C Feb 27 '14 at 09:09
-
@StephenC:- Do correct me if I am wrong. So you mean that Lambda's are not syntactic sugars in Java? – Rahul Tripathi Feb 27 '14 at 09:12
-
1No. I mean what I said. *"Lambdas are NOT just syntactic sugar"*. See the word "just"? I put it there because it is important to what I am saying. (Consider these two statements: "Barak Obama is not the President" and "Barak Obama is not just the President". One of those statements is true, and the other is false. The word "just" is the difference.) – Stephen C Feb 27 '14 at 09:17
-
@StephenC:- Got that! And yes perfect example to explain me the difference! Too good! Thanks again! +100 – Rahul Tripathi Feb 27 '14 at 09:20