Skip to content

Commit 7dd956a

Browse files
committed
chore: 🤖 initial commit [skip ci]
Pure clone from the portuguese version.
0 parents  commit 7dd956a

File tree

386 files changed

+15284
-0
lines changed

Some content is hidden

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

386 files changed

+15284
-0
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* text=auto
2+
*.png binary
3+
*.jpg binary
4+
*.sh text eol=lf
5+
*.bat text eol=crlf

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
book-output
2+
book-release*
3+
4+
### NODE.JS ###
5+
node_modules*
6+
npm-debug.log
7+
8+
### OSX ###
9+
*.DS_Store
10+
._*
11+
12+
### Nosso exemplos ###
13+
arquivo*.txt
14+
15+
### Eclipse ###
16+
.settings/
17+
.project
18+
.classpath
19+
build
20+
bin
21+
22+
### IDEA ###
23+
.idea/*
24+
*.iml
25+
out
26+
27+
# warn IDEA to ignore all files that won't be compiling due to educational examples
28+
!.idea/compiler.xml
29+
30+
# ignores local travis config folder
31+
.travis
32+
33+
### others ###
34+
.vscode

.idea/compiler.xml

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.releaserc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/changelog",
6+
["@semantic-release/git", {
7+
"assets": ["package.json", "CHANGELOG.md"],
8+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
9+
}],
10+
"@semantic-release/github"
11+
]
12+
}

.travis.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
language: ruby
2+
sudo: required
3+
4+
env:
5+
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=
7+
8+
jobs:
9+
include:
10+
- stage: "Semantic Release"
11+
name: "Generate a new release and changelogs"
12+
language: node_js
13+
node_js: lts/*
14+
os:
15+
- linux
16+
install:
17+
- npm install
18+
script: skip
19+
deploy:
20+
provider: script
21+
api_key: "$GITHUB_TOKEN"
22+
node_js: lts/*
23+
skip_cleanup: true
24+
script: npx semantic-release
25+
on:
26+
branch: master
27+
28+
- stage: "GitHub Release"
29+
name: "Send the generated files to the new GitHub release"
30+
services:
31+
- docker
32+
env:
33+
- COMPOSE_FILE=docker-compose.yml
34+
script:
35+
- TRAVIS_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
36+
- git shortlog -s | cut -f 2- > book/contributors.txt
37+
- docker-compose run --rm ebook $TRAVIS_TAG
38+
deploy:
39+
provider: releases
40+
api_key: "$GITHUB_TOKEN"
41+
file_glob: true
42+
file: book-release/*
43+
skip_cleanup: true
44+
on:
45+
branch: master

A-tricks-to-succeed.asc

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
[[A-tricks-to-succeed]]
2+
[appendix]
3+
== Dicas para ter sucesso na prova!
4+
5+
Além de validar conceitos importantes da linguagem Java a prova de certificação também exigirá que você esteja atento a detalhes específicos nos códigos de cada questão. Sem o auxílio da IDE, você será o compilador.
6+
7+
Veja alguns exemplos simples que se mostram óbvios mas podem te enganar na hora de marcar a resposta certa.
8+
9+
=== Cenário 1
10+
11+
[source,java]
12+
----
13+
class Duke {
14+
static int version = 6;
15+
16+
public static void main(String[] args){
17+
System.out.println("Java" + version)
18+
version = version + 2;
19+
}
20+
}
21+
----
22+
. Compila e imprime "Java6"
23+
. Compila e imprime "Java8"
24+
. Não compila
25+
. Compila, mas ocorre um erro durante a execução
26+
27+
Sem pensar muito a reposta seria a _opção 1_, certo? Errado. Olhando mais atentamente ao código é possível notar que na primeira linha do método `main` está faltando um `;` (ponto-e-vírgula). Esse pequeno detalhe mostra que a opção certa é a 3.
28+
29+
[TIP]
30+
--
31+
Sempre que existir uma resposta falando _código não compila_, verifique duas vezes as regras de compilação antes de testar o comportamento do código e sua possível resposta.
32+
33+
.Checklist mental para validar uma compilação
34+
* Ponto-e-vírgula
35+
* Visibilidade
36+
* Escopo de variáveis
37+
* Nomes e parâmetros de métodos
38+
* ...
39+
--
40+
41+
- - -
42+
_Resposta: 3_
43+
44+
=== Cenário 2
45+
46+
[source,java]
47+
----
48+
class Duke {
49+
static int version = 6;
50+
51+
public static void main(String[] version) {
52+
version = 8;
53+
System.out.println("Java" + version);
54+
}
55+
}
56+
----
57+
. O código compila e roda, imprimindo "Java8".
58+
. O código não compila.
59+
. O código compila e roda, imprimindo "Java6".
60+
. O código compila mas dá erro em execução.
61+
62+
Se você escolheu a opção 1, você errou... Esse exemplo tem outra pegadinha com o conceito de _shadowing_. Usa-se o mesmo nome de váriável mas com um escopo diferente. Inicialmente o tipo `int` engana sua reposta mas esse código não compila ao tentar atribuir um valor `int` à uma variável do tipo `String[]`.
63+
64+
- - -
65+
_Resposta: 2_
66+
67+
=== Cenário 3
68+
69+
[source,java]
70+
----
71+
class Duke {
72+
73+
public static void main(String[] args) {
74+
boolean dukeClones = new boolean[100];
75+
System.out.println(dukeClones[10]);
76+
}
77+
}
78+
----
79+
. Imprime `1`
80+
. Imprime `0`
81+
. Imprime `false`
82+
. Imprime `true`
83+
. Imprime `null`
84+
. Erro de execução
85+
. Não compila
86+
87+
A escolha mais comum seria a opção 3, onde confirma que o valor padrão de cada posição de um array do tipo _boolean_ é _false_. Esta opção estaria certa, se não fosse uma pegadinha. Este código na verdade *não compila*. A opção certa seria a número 7. Isso porque a variável _dukeClones_ é um _boolean_ simples tentando receber um array do tipo _boolean_.
88+
89+
[TIP]
90+
--
91+
Em uma inicialização implícita como membro de uma classe, ou cada posição de um array, etc, a variável recebe o valor padrão respeitando a seguinte regra:
92+
93+
* _boolean_ -> *_false_*
94+
* _char_ -> *vazio*, equivalente a 0
95+
* Primitivos numéricos inteiros -> *0*
96+
* Primitivos numéricos com ponto flutuante -> *0.0*
97+
* Referências (Objetos) -> *_null_*
98+
--
99+
100+
- - -
101+
_Resposta: 7_

B-test-yourself.asc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
[[B-test-yourself]]
2+
[appendix]
3+
== Teste seu conhecimento!
4+
5+
Hora de colocar em prática tudo que foi visto neste livro. Existem algumas opções gratuitas e várias opções pagas. A opção mais interessante para ambos os casos é a *Whizlabs*.
6+
7+
Todos os testes listados abaixo são em inglês, provavelmente o mesmo idioma que você fará seu teste.
8+
9+
IMPORTANT: Todas as opções são referentes à prova _1Z0-813_ (atualização do Java 6 ou inferior para o Java 8).
10+
11+
=== Gratuito
12+
13+
[cols="2*^.^"]
14+
|===
15+
| Link | Qtd. Questões
16+
17+
| https://www.whizlabs.com/ocpjp-8-upgrade-1z0-813/free-test/[Whizlabs]
18+
| 25
19+
20+
| https://learn.oracle.com/education/downloads/Exam813_SampleQuestion.pdf[Oracle]
21+
| 8
22+
23+
|===
24+
25+
=== Pagos
26+
27+
[cols="3*^.^"]
28+
|===
29+
| Link | Qtd. Questões | Preço
30+
31+
| https://www.whizlabs.com/ocpjp-8-upgrade-1z0-813/practice-tests/[Whizlabs] *(Recomendado)*
32+
| 360
33+
| $9.95
34+
35+
| https://www.kaplanittraining.com/certification/oracle/1z0-813[Kaplan IT Training] (30-180 dias)
36+
| ?
37+
| $89
38+
39+
| https://education.oracle.com/certification-epractice-exam-30-day-online-access/courP_2364[Oracle] (30 dias)
40+
| ?
41+
| R$ 169,00
42+
43+
| https://education.oracle.com/certification-epractice-exam-180-day-online-access/courP_8737[Oracle] (180 dias)
44+
| ?
45+
| R$ 290,00
46+
47+
| https://www.examcollection.com/1z0-813.html[Exam Collection]
48+
| 61
49+
| $69.99
50+
51+
| https://www.pass-guaranteed.com/1Z0-813.htm[Pass-Guaranteed.com]
52+
| ?
53+
| ?
54+
55+
|===

C-references.asc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[[C-references]]
2+
[appendix]
3+
== Referências
4+
5+
include::README.asc[lines=34..-1]

LICENSE.asc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Rinaldo Pitzer Jr. e Rodrigo Moutinho
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)