-1

What are the main features which are no longer available from java 8 onwards

Greeshma
  • 95
  • 2
  • 10
  • 1
    Java is built to be backwards compatible – shinjw Aug 17 '18 at 09:49
  • 4
    @shinjw While this is the goal, this rule was broken few times for instance `"abc".split("")` gives different results in Java 7 and Java 8 (more info at: [Why in Java 8 split sometimes removes empty strings at start of result array?](https://stackoverflow.com/q/22718744)) – Pshemo Aug 17 '18 at 09:54
  • Is this your homework? You seem to be treating Stack Overflow like a free programming service. That's not what it's for. – Dawood ibn Kareem Aug 17 '18 at 09:59
  • @DawoodibnKareem Well...stackoverflow is a platform to help each other when in need of programming doubts....i dont think i need any advice regarding it – Greeshma Aug 17 '18 at 10:09
  • 4
    @GreeshmaVSNair "stackoverflow is a platform to help each other" close but not entirely correct. New people often are misunderstanding *goal* of this site. They think we are here to help *them* specifically. That is NOT the truth. This site was created to be repository of programming questions and answers which can help *many* people, not just asker. Helping asker is additional effect, but because of that misconception askers incorrectly think that they are *entitled* to get answers for *any* programming question just because it is about programming, regardless of its quality. – Pshemo Aug 17 '18 at 10:40
  • 1
    (BTW I am not saying that this question doesn't fit here) – Pshemo Aug 17 '18 at 10:40
  • @GreeshmaVSNair Yes, we help each other. So, how exactly does it help you if someone does your homework for you? – Dawood ibn Kareem Aug 17 '18 at 11:02

1 Answers1

10

See here : Compatibility Guide for JDK 8 .

Among the Incompatibilities between Java SE 8 and Java SE 7 :

In previous releases, some implementations of Collection.removeAll(Collection) and retainAll(Collection) would silently ignore a null parameter if the collection itself was empty. As of this release, collections will consistently throw a NullPointerException if null is provided as a parameter.

So your program could simply contain :

    List<String> list = new ArrayList<>();

    list.removeAll(null);

It will work in Java 7 , not in Java 8 .

This is one example, if you get through the above link, you will find several other ways to have such an incompatible program.

Arnaud
  • 17,229
  • 3
  • 31
  • 44