https://github.com/artus/oca_se_8_exercises
Exercises that help you get ready for the OCA SE 8 exam.
https://github.com/artus/oca_se_8_exercises
certification certification-prep java java-8 java8 oca
Last synced: 6 months ago
JSON representation
Exercises that help you get ready for the OCA SE 8 exam.
- Host: GitHub
- URL: https://github.com/artus/oca_se_8_exercises
- Owner: artus
- Created: 2018-10-23T13:50:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-06T10:58:01.000Z (over 7 years ago)
- Last Synced: 2023-03-04T16:33:55.894Z (about 3 years ago)
- Topics: certification, certification-prep, java, java-8, java8, oca
- Language: Java
- Size: 37.1 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Training question for the OCA exam.
## Rules
### Extra code
The `helpers.Helper` methods are there to check which type an expression returns. They are always correct, so you don't need to check for mistakes over there. So if, for instance, you see:
```java
import helpers.Helper;
```
or
```java
Helper.GET_TYPE(3 * 4);
```
You don't have to check for errors. The `GET_TYPE` method will return the type of the expression passed as a parameter.
### Access Modifiers
These exercises don't handle the `access modifiers` handled in chapter 4:
- private
- default (package private)
- protected
- public
Make sure you don't forget to train on them using other resources.
## Running one-liners
Using the `java-terminal.sh` you can execute one-liners to test certain expressions.
```shell
bash java-terminal.sh # PRESS ENTER
> System.out.println("Hello"); # PRESS ENTER
Hello
```
## Training
### Continuous exercises
To just start practicing, run
```shell
bash ./run.sh train
```
This will show you Java 1.8 code, which you can analyse and think about how the compiler will handle it. When you think what will happen, you just press a button and the compiler will show what he makes of it.
After you've seen the result, press another button to continue to the next code fragment.
### Running exercises for a specific chapter
To run exercises from a specific chapter, just type
```shell
bash ./run.sh [chapter_number]
```
where `[chapter_number]` is the number of the chapter you want to train. you can also type `random` to get a random chapter.
### Running specific exercises.
To run specific exercises, just type
```shell
bash ./run.sh [chapter_number] [exercise_number]
```
where `[chapter_number]` is the number of the chapter you want to train and `[exercise_number]` is the number of the exercise you want to train. You can also type `random`.