This repository contains the exercises completed while learning JAVA in the Udemy's Java course:
- The first exercise is always the most relevant: "Hello, World!" π π
- Here is an exercise using
Scannerto store inputs. And this other exercise demonstrates howsc.nextLine()command can be used; - I didn't know how fun it is to combine the principles of JAVA and mathematics:
- The List of exercises part 1 contains exercises that:
- Read two numbers and present their sum;
- Calculate a circle area based on the input radius;
- Calculate the difference between 2 pairs of numbers;
- Calculate the employee salary based on their work hours πΈ. In this exercise, it's displayed the taxes paid based on the salary;
- Exercise 5 calculates the total amount when shopping ποΈ two different products;
- The last exercise calculates the areas of the following geometric shapes π:Triangle, Circle, Trapezium, Square, and Rectangle;
- The part 2 of the list continues to play with Math concepts:
- Check if the number is negative or positive;
- Confirm if the number is even or ddd;
- Inform if a number is a multiple of another;
- Calculate a game duration (depending on the game, can take many hours β³);
- Check the number interval the input number is part of, for example, if the input is 3 the number belongs to the range [0,25];
- This exercise checks the correspondent mathematical quadrant for the input number
- The List of exercises part 1 contains exercises that:
- This exercise explored the
DEBUG, the code was already used in the geometric exercises however inEclipse IDEI learned how to toggle breakpoints and the particularities of debugging a code. - Repetition structures
- First exercise using
Whilestructure, on this code, the user should input as many numbers as they want and at the end, the sum of these numbers is displayed when pressing zero.- Learning further this repetition structure it's possible to understand how can be applied in real examples, this code reads the password and checks if it's valid or not.
- Here is an exercise demonstrating
Do-Whilestructure, a variation of the While structure. We first add the action (using "do") and then add the repeat condition. This same structure is also applicable in JavaScript or C++. In this exercise, we use the repeat condition to know if the user wants to convert another temperature from Celsius to Fahrenheit.
- First exercise using
- Currently studying examples of object orientation and will post them shortly π