Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758
{"id":962,"date":"2014-07-10T20:31:22","date_gmt":"2014-07-10T23:31:22","guid":{"rendered":"http:\/\/www.feltex.com.br\/felix\/?p=962"},"modified":"2015-04-06T16:09:22","modified_gmt":"2015-04-06T19:09:22","slug":"5-novidades-java-8","status":"publish","type":"post","link":"https:\/\/www.feltex.com.br\/felix\/5-novidades-java-8\/","title":{"rendered":"5 novidades do Java 8"},"content":{"rendered":"

5 novidades do Java 8<\/H1><\/p>\n

\"5<\/p>\n

Voc\u00ea ver\u00e1 no artigo de hoje as 5 novidades no Java 8 que mudar\u00e3o a forma de programa\u00e7\u00e3o em java. H\u00e1 melhorias de performance, novidades na manipula\u00e7\u00e3o de datas e a grande novidade que \u00e9 o uso de express\u00f5es Lambdas entre muitas outras.<\/p>\n

<\/p>\n

\tA linguagem Java tem evolu\u00eddo muito nos \u00faltimos anos. Como era de se esperar o novo lan\u00e7amento da vers\u00e3o 8 traz muitas novidades significativas para n\u00f3s programadores. Ent\u00e3o vamos aqui listar algumas:<\/p>\n

1. Lambda Expressions<\/H2>
\n\tLambda Expressions \u00e9 um novo recurso da linguagem java introduzido nesta vers\u00e3o. Eles permitem que voc\u00ea trate a funcionalidade como um argumento de m\u00e9todo ou c\u00f3digo como dados. As express\u00f5es lambda podem expressar inst\u00e2ncias de interfaces em um \u00fanico m\u00e9todo (o que se refere a interfaces como funcionais) de forma mais compacta.
\n\tEsta \u00e9 uma evolu\u00e7\u00e3o da linguagem Java que a torna mais flex\u00edvel e deixa a sua implementa\u00e7\u00e3o de c\u00f3digo mais enxuta. Veja um exemplo abaixo de manipula\u00e7\u00e3o de listas:<\/p>\n
\r\npublic static void main(String[] args) {\r\n\t\tList novidades = Arrays.asList(\"Lambdas\", \"Default Method\",\r\n\t\t\t\t\"Stream API\", \"Date and Time API\");\r\n\r\n\t\t\/\/ Antes do Java 8:\r\n\t\tfor (String novidade : novidades) {\r\n\t\t\tSystem.out.println(novidade);\r\n\t\t}\r\n\t\t\/\/   Como fica o c\u00f3digo com uso de Lambda no Java 8:\r\n\t\tnovidades.forEach(n -> System.out.println(n));\r\n\t} \r\n<\/pre>\n

2. API de Data e Hora<\/H2> <\/p>\n

\tEssa nova API de Data e Hora permitir\u00e1 que os desenvolvedores tratem data e hora de maneira mais natural, clara e f\u00e1cil de entender. At\u00e9 a vers\u00e3o do Java 7 t\u00ednhamos v\u00e1rias classes para
\ntrabalhar com data. E claro, elas foram mantidas na nova vers\u00e3o.<\/p>\n