Skip to content

Commit b39673e

Browse files
authored
Merge pull request #12 from duke-certification/develop
Language Enhancements, translated
2 parents 7dd956a + b93d36a commit b39673e

File tree

54 files changed

+416
-426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+416
-426
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ npm-debug.log
99
*.DS_Store
1010
._*
1111

12-
### Nosso exemplos ###
13-
arquivo*.txt
12+
### Examples ###
13+
file*.txt
1414

1515
### Eclipse ###
1616
.settings/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sudo: required
33

44
env:
55
global:
6-
secure: eXGVND48r4WyUCELydGxJ5NZURQ5iSaMYT6sLyPAdsjoio5NO+/eF17Fw61YqljrSgy+SuYTtHSeVLET4VOVMry2AH2474UD4DDAZ0Fo21s/u/+wQzIW7szO+gzg+PB/22zM67Yx+9ICo+xm10juHwJRyse9s5EFCgL40LtHPWXc5iTbSJtQFbc3YqPMmrvZZEeGYKAEX6uaqeoSi5PJdDrZfMAcienrbXMx9ASW1LlaJXEr3GKQLHxdfeiEsmVpppeYbfVSRcNRGIgFHS397D2eTVBbsTnxx72dqkR6eYC9z0sifai6baTPx34K3Us1lTx9/bR2DKYohNhea7jinYNSuJB2Lyrf3u4qfJPVLlnSgT+fJYPkmmjDuRepRUK6Kvs4M69YA7FdOhSKHpZlKUtIGjRVFe4CTvkoPAJt+lSaifVKWBD6Q18NqgCkCgijIq3Hn8tjtbWHe256fqZYjio4HBHwfifWG5oxK9ZTKxc9Z+wv2mASHhnmjWpHCtFvib8HMtIizqEVOndg58vMFXJNX1sisZxIV8+I7LSgHU7OBfi2A2Ik5Zeuo46Q7/V+2xl/nOOpC6M7Bgbe+c8gFc8PyJA/3w9+m6xUmRuE5F14D4ItXZvK1lR70oBTlFb0fXNQrEejsKAerXRw1ThbmaFZqcw7ppPQrOM+ZvFcQf0=
6+
secure: UQEVLPeTl6NG7X2y3mdXKEOtchx/uPNNwWOckOAaKfFNIG3MMqfDMnBYGrcj38303zwbqYxjg/2ptwpTeA+eW1TWe1N+I1Y/BX6jA0bUKZgS2PvQXN8SHehDV33pWkSkhxhAi3pp/T3cvVugse2MMWtlRCZ9WizY0jn1viU40G3VQJYi4cNe+QwdxEvG7/GlWW11i9D8ev4nhTKEwYUGQ/KZHjCZwWzVjVesvV7mfcvjZWN4OrMYMH76hjIqA6WIa2pVtIgLp1ZF6g13AYQPlqzBTsItssukQfh/1fzrdGD9v/fbH60N6NDqpJmqVfDnCHOuioS8ZNPo9GZ62nDeTPa5EWETwLxqcbJWL4xWZFvDHSEUL5ZFLfEXZAANw2jPojYZU71mqRSGeLE+ZVh2sb11t4oOis0do7MR8G9/3U7vcqpoigslSaECtXN2G3lA4gAJkKzbkvfnQtseDF6LTclG29mGmA8g6uXNN9kBCK5alkhrrerad1otDfkp/09mwWNGzjSlBYGhrbHZiHVNnVlHr0dMbOc33xxOzqSeFNZsUYnUbGt01pVQzIgzMp5cErEHdxMmwvLoePNcaT2iy5kseJOkKlheDF6Lmbo/yoCta7MCIi0Fdrz7AYL+LnYEW8cHKx5vnu7R3/gkDjGdCIG0WRQ+HZPDD19maq6sem0=
77

88
jobs:
99
include:

C-references.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[C-references]]
22
[appendix]
3-
== Referências
3+
== References
44

55
include::README.asc[lines=34..-1]

LICENSE.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Rinaldo Pitzer Jr. e Rodrigo Moutinho
3+
Copyright (c) 2019 Rinaldo Pitzer Jr. and Rodrigo Moutinho
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.asc

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
= Guia Prático para Certificação: Atualize sua certificação Java 6 para Java 8
1+
= Practical Guide to Certification: Update your certification from Java 6 to Java 8
22

3-
image:https://img.shields.io/travis/com/duke-certification/java6-to-java8.svg[Travis (.com), link=https://travis-ci.com/duke-certification/java6-to-java8] image:https://img.shields.io/github/release/duke-certification/java6-to-java8.svg[GitHub release] image:https://img.shields.io/github/release-date/duke-certification/java6-to-java8.svg[GitHub Release Date] image:https://img.shields.io/github/downloads/duke-certification/java6-to-java8/total.svg[GitHub All Releases] image:https://img.shields.io/github/issues/duke-certification/java6-to-java8.svg[GitHub issues] image:https://img.shields.io/github/license/duke-certification/java6-to-java8.svg[GitHub License]
3+
image:https://img.shields.io/travis/com/duke-certification/java6-to-java8-en.svg[Travis (.com), link=https://travis-ci.com/duke-certification/java6-to-java8-en] image:https://img.shields.io/github/release/duke-certification/java6-to-java8-en.svg[GitHub release] image:https://img.shields.io/github/release-date/duke-certification/java6-to-java8-en.svg[GitHub Release Date] image:https://img.shields.io/github/downloads/duke-certification/java6-to-java8-en/total.svg[GitHub All Releases] image:https://img.shields.io/github/issues/duke-certification/java6-to-java8-en.svg[GitHub issues] image:https://img.shields.io/github/license/duke-certification/java6-to-java8-en.svg[GitHub License]
44

5-
Este projeto serve como material de apoio na realização do exame *https://education.oracle.com/upgrade-to-java-se-8-ocp/pexam_1Z0-813[1Z0-813]* que atualiza qualquer profissional com certificação Java 6 ou inferior, para a versão 8. No momento desta documentação, o _voucher_ do exame custa R$ 597,00 no Brasil.
5+
This project is a support material for the *https://education.oracle.com/upgrade-to-java-se-8-ocp/pexam_1Z0-813[1Z0-813]* exam that updates any certified Java professional from version 6 or lower to version 8.
66

7-
image::images/ebook-400x400.png[Guia Open Source para Certificação,align="center"]
7+
image::images/ebook-400x400.png[Practical Guide to Certification,align="center"]
88

9-
Baixe a versão mais recente do ebook https://github.com/duke-certification/java6-to-java8/releases[no link de releases].
9+
Download the eBook latest version on the https://github.com/duke-certification/java6-to-java8-en/releases[releases' page].
1010

11-
== Gerando o Livro
12-
Para gerar cada arquivo do livro (HTML, Epub, Mobi e PDF), utilize a https://github.com/asciidoctor/docker-asciidoctor[imagem oficial do asciidoctor] para não precisar instalar nada em sua máquina, exceto o https://docker.com[Docker].
11+
== Generating the Book
12+
To generate each file in the book (HTML, Epub, Mobi, and PDF), use the https://github.com/asciidoctor/docker-asciidoctor[official asciidoctor image], so you don't have to install anything except https://docker.com[Docker].
1313

14-
Execute este comando a partir do diretório raiz deste projeto:
14+
Run the following command from the root directory of this project:
1515

1616
[source,shell]
17-
.Utilizando Docker Compose
17+
.Using Docker Compose
1818
----
1919
docker-compose run --rm ebook
2020
----
2121

2222
[source,shell]
23-
.Utilizando Docker
23+
.Using Docker
2424
----
2525
# linux / unix
2626
docker run --rm -v $(pwd):/documents/ asciidoctor/docker-asciidoctor scripts/docker-startup.sh
2727
28-
# others (substituir <caminho> pelo diretório completo deste projeto)
29-
docker run --rm -v <caminho>:/documents/ asciidoctor/docker-asciidoctor scripts/docker-startup.sh
28+
# others (change <path> with the full path of this project)
29+
docker run --rm -v <path>:/documents/ asciidoctor/docker-asciidoctor scripts/docker-startup.sh
3030
----
3131

32-
== Referências
32+
== References
3333

34-
Em todas sessões do livro são feitas referências diretas as fontes de inspiração ou argumentação base para a criação deste conteúdo. A seguir o resumo das principais e de outras referências que também fizeram parte dessa jornada de aprendizado.
34+
Direct references are made in every session of the book for the inspiration sources or base resources used during the creation of this content. The following is a summary of the main resources and other references that were also part of this learning journey.
3535

36-
Para criação da estrutura do projeto deste livro foi utilizado como base o projeto https://github.com/rcmoutinho/ebook-with-asciidoctor[ebook-with-asciidoctor].
36+
The project structure of this book is based on the https://github.com/rcmoutinho/ebook-with-asciidoctor[ebook-with-asciidoctor] project.
3737

38-
NOTE: Boa parte das fontes estão em inglês *(en-US)*, mas algumas também podem ser encontradas em português *(pt-BR)*.
38+
NOTE: Most of the sources are in English *(en-US)*, but some can also be found in Portuguese *(pt-BR)*.
3939

40-
* *(en-US)* Excelente livro que mostra o passo-a-passo para tirar a certificação completa do Java 8 ou atualizar para a versão 8, objetivo deste livro.
40+
* *(en-US)* An excellent book that shows you the step-by-step guide to complete Java 8 certification or upgrade to version 8, the purpose of this book.
4141
+
4242
Boyarsky, Jeanne; Selikoff, Scott. OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide: Exam 1Z0-809 (English Edition) 1st Edition. Wiley. Edição do Kindle.
4343
+
44-
https://www.amazon.com.br/dp/B0191U2H8C[Link na loja Amazon Brasil].
44+
https://www.amazon.com/dp/B0191U2H8C[Amazon.com].
4545

46-
* *(en-US)* Blog do Eugen (Baeldung) com dezenas de artigos focados em Java, entre outros assuntos.
46+
* *(en-US)* Eugen's (Baeldung) blog with dozens of articles focused on Java, among other topics.
4747
+
4848
https://www.baeldung.com/category/java/
4949

50-
* *(en-US)* Tutoriais da própria Oracle com explicações detalhadas da linguagem Java.
50+
* *(en-US)* Oracle's own tutorials with detailed explanations of the Java language.
5151
+
5252
https://docs.oracle.com/javase/tutorial/java/
5353

54-
* *(en-US)* Documentação oficial do Java.
54+
* *(en-US)* Oficial Java documentation.
5555
+
5656
https://docs.oracle.com/javase/8/docs/
5757

58-
* *(pt-BR)* Curso da Alura, que apesar de focar no Java 7 (ao menos no momento da escrita desse texto), mostra como não cair em pegadinhas na prova. Principalmente em relação à situações que exigem pensar como um compilador e apontar a falta de um `;`. São mais de 80 horas de conteúdo. Vale muito a pena para quem quer ir a fundo de cada detalhe da linguagem (pelo menos até a versão 7).
58+
* *(pt-BR)* Alura's course, which despite focusing on Java 7 (at least at the time of writing this text), shows how not to fall on traps on the test. Especially in situations that require thinking like a compiler and pointing out the lack of a `;`. More than 80 hours of content. It is worth it for those who want to go deep into every detail of the Java language (at least until version 7).
5959
+
6060
https://www.alura.com.br/formacao-certificacao-java
6161

62-
=== Material Complementar
62+
=== Complementary Material
6363

64-
* *(pt-BR)* Canal do YouTube https://www.youtube.com/channel/UCyRDiqqSkqGvTE_wIB1nN1w[RinaldoDev] com vídeos explicativos de diversos conceitos da linguagem Java.
64+
* *(pt-BR)* https://www.youtube.com/channel/UCyRDiqqSkqGvTE_wIB1nN1w[RinaldoDev] YouTube channel with explanatory videos of various Java language concepts.
6565

66-
* *(en-US)* https://www.youtube.com/playlist?list=PL3py5YSIGvPMgKXOVqnYn9nBoT_zvsvsi[_Java Challengers_], uma playlist no Youtube do canal do https://twitter.com/RafaDelNero[Rafael Del Nero] que explica desafios de Java para ensinar conceitos importantes da linguagem.
66+
* *(en-US)* https://www.youtube.com/playlist?list=PL3py5YSIGvPMgKXOVqnYn9nBoT_zvsvsi[_Java Challengers_], a Youtube playlist from https://twitter.com/RafaDelNero[Rafael Del Nero's] channel that explains Java challenges to teach essential language concepts.
6767

68-
* *(en-US)* https://devgym.oracle.com/pls/apex/dg/competition/java[Oracle Dev Gym], desafios online e gratuitos para testar suas habilidades de Java.
68+
* *(en-US)* https://devgym.oracle.com/pls/apex/dg/competition/java[Oracle Dev Gym], free online challenges to test your Java skills.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
=== Introdução
1+
=== Introduction
22

33
include::../../../README.asc[lines=5..6]
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
=== Objetivos
1+
=== Objectives
22

3-
Como guia para criação deste livro foi utilizado todos os objetivos citados na seção _"Review Exam Topics"_, de acordo com o https://education.oracle.com/upgrade-to-java-se-8-ocp/pexam_1Z0-813[site da certificação].
3+
As a guide for the creation of this book, we used all the objectives mentioned in the _"Review Exam Topics"_ section, according to the https://education.oracle.com/upgrade-to-java-se-8-ocp/pexam_1Z0-813[certification website].
44

5-
A missão deste livro é criar o maior número de exemplos práticos possíveis para ajudar você a colocar a mão na massa. Quanto maior for seu contato com os códigos da versão 8 do Java, mais confiante estará na hora do exame, e também para lidar com projetos em Java 8 no mercado de trabalho.
5+
The mission of this book is to create as many practical examples as possible to help you get your hands on coding. The greater your contact with Java version 8 code, the more confident you will be at exam time, as well as dealing with Java 8 projects in the job market.
Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,135 @@
11
:java-package: src/org/j6toj8/languageenhancements
22
:section-java-package: ../../../{java-package}
33

4-
=== Objetos Strings
4+
=== String objects
55

6-
.Objetivo
6+
.Objective
77
----
88
Develop code that uses String objects in the switch statement, binary literals, and numeric literals, including underscores in literals.
9-
-
10-
Desenvolver código que utilize objetos String em instruções Switch, binários literais, e numéricos literais, incluindo underscore (_) em literais.
119
----
1210

13-
==== String em instruções Switch
11+
==== String in the switch statement
1412

15-
É esperado que o candidato saiba compreender e analisar o uso de Strings em instruções `switch`, como no seguinte exemplo.
13+
The candidate is expected to understand and analyze the use of Strings in `switch` statements, as in the following example.
1614

1715
[source,java,indent=0]
1816
.{java-package}/stringinswitch/StringInSwitch_Complete.java
1917
----
2018
include::{section-java-package}/stringinswitch/StringInSwitch_Complete.java[tag=code]
2119
----
2220

23-
Apesar da certificação ter foco nas atualizações trazidas pelo Java 7 e 8, é esperado que o candidato entenda também conceitos de versões anteriores do Java. Por isso, serão apresentadas algumas regras que talvez você já conheça sobre `switch`, mas utilizando `String` no `switch`.
21+
Although certification focuses on updates brought by Java 7 and 8, the candidate is expected to understand concepts from previous versions of Java as well. Therefore, some rules you may already know about `switch` will be presented but using `String` on the `switch`.
2422

25-
. Todo `case` deve ser único, não pode se repetir.
23+
. Every `case` must be unique, cannot be repeated.
2624

27-
. O `default` pode aparecer em qualquer posição no `switch`.
25+
. The `default` can appear anywhere on the `switch`.
2826
+
2927
.{java-package}/stringinswitch/StringInSwitch_Default.java
3028
[source,java,indent=0]
3129
----
3230
include::{section-java-package}/stringinswitch/StringInSwitch_Default.java[tag=code]
3331
----
3432

35-
. Tipos suportados em `switch`.
36-
* int e Integer
37-
* byte e Byte
38-
* short e Short
39-
* char e Character
33+
. Supported types in `switch`.
34+
* int and Integer
35+
* byte and Byte
36+
* short and Short
37+
* char and Character
4038
* String
41-
* valores de Enums
39+
* Enums values
4240

43-
. Tipos não suportados em `switch`.
41+
. Types not supported in `switch`.
4442
+
4543
.{java-package}/stringinswitch/StringInSwitch_Type.java
4644
[source,java,indent=0]
4745
----
4846
include::{section-java-package}/stringinswitch/StringInSwitch_Type.java[tag=code]
4947
----
5048

51-
. A execução se inicia em um `case` e somente para ao encontrar um `break`.
49+
. Execution starts in a `case` and only stops when it encounters a `break`.
5250
+
5351
.{java-package}/stringinswitch/StringInSwitch_Break.java
5452
[source,java,indent=0]
5553
----
5654
include::{section-java-package}/stringinswitch/StringInSwitch_Break.java[tag=code]
5755
----
5856
+
59-
.saída no console
57+
.console output
6058
[source,console]
6159
----
62-
Janeiro
63-
Não é um mês
64-
Fevereiro
60+
January
61+
Not a month
62+
February
6563
----
6664
+
67-
Nesse caso a execução inicia no `case "jan"`, passar pelo `default` e pelo `case "fev"` até parar no `break`, por isso as 3 strings aparecem no console.
65+
In this case, execution starts in `case "jan "`, goes through `default` and `case "Feb"` until it stops at `break`. So the 3 strings will appear in the console.
6866

69-
. Um `switch` vazio é válido, mesmo que não tenha utilidade.
67+
. An empty `switch` is valid even if it has no use.
7068
+
7169
.{java-package}/stringinswitch/StringInSwitch_Empty.java
7270
[source,java,indent=0]
7371
----
7472
include::{section-java-package}/stringinswitch/StringInSwitch_Empty.java[tag=code]
7573
----
7674

77-
. Todos os valores de `case` precisam ser constantes, ou seja, variáveis finais em tempo de compilação. Se o valor do `case` puder mudar em tempo de execução, o código não compila.
75+
. All `case` values must be constant, i.e., final variables at compile time. If the value of `case` can change at runtime, the code does not compile.
7876
+
7977
.{java-package}/stringinswitch/StringInSwitch_ConstantOnly.java
8078
[source,java,indent=0]
8179
----
8280
include::{section-java-package}/stringinswitch/StringInSwitch_ConstantOnly.java[tag=code]
8381
----
8482

85-
Pronto, essas são as regras de `switch`. Você provavelmente já conheçe algumas referentes à versões anteriores do Java, mas agora você as viu em `switch` que utilizam Strings. Isso não era possível antes do Java 7.
83+
These are the switch rules. You probably already know some about previous versions of Java, but now you have seen them in `switch` that use Strings. This was not possible before Java 7.
8684

87-
==== Literais Binários e Numéricos, incluindo underscore( _ )
85+
==== Binary and numeric literals, including underscores in literals
8886

89-
É esperado que o candidato saiba compreender e analisar o uso de literais binários e numéricos, como no seguinte exemplo.
87+
The candidate is expected to understand and analyze the use of binary and numeric literals, as in the following example.
9088

9189
[source,java,indent=0]
9290
.{java-package}/literals/Literals_Complete.java
9391
----
9492
include::{section-java-package}/literals/Literals_Complete.java[tag=code]
9593
----
9694

97-
Apesar da certificação ter foco nas atualizações trazidas pelo Java 7 e 8, é esperado que o candidato entenda também conceitos de versões anteriores do Java. Por isso, serão apresentadas algumas regras que talvez você já conheça sobre literais.
95+
Although certification focuses on updates brought by Java 7 and 8, the candidate is expected to understand concepts from previous versions of Java as well. So here are some rules you may already know about literals.
9896

99-
. No Java, _Literal_ é qualquer número escrito diretamente no código, como todos do exemplo acima.
97+
. In Java, _Literal_ is any number written directly in code, like the previous example.
10098

101-
. Por padrão, o Java interpreta literais como `int`. Ou seja, se não houver um sufixo no número para mudar seu tipo, ele é um `int`.
99+
. By default, Java interprets literals as `int`. That is, if there is no suffix in the number to change its type, it is an `int`.
102100
+
103101
.{java-package}/literals/Literals_Suffix.java
104102
[source,java,indent=0]
105103
----
106104
include::{section-java-package}/literals/Literals_Suffix.java[tag=code]
107105
----
108106

109-
. Por padrão, o Java interpreta literais como sendo decimais. Existem prefixos que mudam o sistema numérico do literal.
107+
. By default, Java interprets literals to be decimal. There are prefixes that change the numerical system of the literal.
110108
+
111109
.{java-package}/literals/Literals_Prefix.java
112110
[source,java,indent=0]
113111
----
114112
include::{section-java-package}/literals/Literals_Prefix.java[tag=code]
115113
----
116114

117-
. A partir do Java 7, é possível utilizar underscore (_) para separar visualmente um número. Isso não muda o valor do número, e serve apenas para tornar o código mais legível.
115+
. Starting with Java 7, you can use underscore (_) to visually separate a number. This does not change the value of the number, and only serves to make the code more readable.
118116
+
119117
.{java-package}/literals/Literals_Underscore.java
120118
[source,java,indent=0]
121119
----
122120
include::{section-java-package}/literals/Literals_Underscore.java[tag=code]
123121
----
124122

125-
.Referências
123+
.References
126124
****
127125
128-
.Strings em Switch
129-
* Boyarsky, Jeanne; Selikoff, Scott. OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide (p. 598). Wiley. Edição do Kindle.
126+
.String in the switch statement
127+
* Boyarsky, Jeanne; Selikoff, Scott. OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide (p. 598). Wiley. Kindle Edition.
130128
* https://docs.oracle.com/javase/8/docs/technotes/guides/language/strings-switch.html[Strings in switch Statements.] Java Documentation.
131129
* https://dzone.com/articles/new-java-7-feature-string[New Java 7 Feature: String in Switch support.] DZone.
132130
133-
.Literais
134-
* Boyarsky, Jeanne; Selikoff, Scott. OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide (p. 597). Wiley. Edição do Kindle.
131+
.Literals
132+
* Boyarsky, Jeanne; Selikoff, Scott. OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide (p. 597). Wiley. Kindle Edition.
135133
* https://pt.wikibooks.org/wiki/Java/Literais[Java/Literais.] Wikibooks.
136134
137135
****

0 commit comments

Comments
 (0)