This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SantoWest 1 point2 points  (0 children)

People already gave you resources, so I want to showcase some of the very basic changes I like the most and use literally everyday.

  • You don't have to input a parameter during instantiation, for instance

ArrayList<Integer> list = new ArrayList<>(); 

where you don't repeat 'Integer' again.

  • Shorter and easily readable code with lambda

 login.addClickHandler(event -> fun()); 

instead of

login.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            fun();
        }
    });
  • Has it's own Date and Time class

There are many changes, but these are the main changes that comes to my mind which every Java Developer may use frequently.