Basic Exercises in Java

In this tutorial we bring you 5 basic examples in Java. Using the Eclipse platform.

Java is one of the programming languages ​​that are more object-oriented than others. Offers robust code, featuring automatic memory management, which reduces the number of errors.

That is why Java continues to take center stage as it is a high-performance programming language..

Exercise 1.- Calculate the area of ​​a circle, asking for the radius of this.

Example of Results in the Exercise Console 1

Exercise 2.- Read two numbers and say if they are the same or not.

Example of Results in the Exercise Console 2

Exercise 3.- Read two numbers and say which is the greater or if they are equal.

Example of Results in the Exercise Console 3

Exercise 4.- Ask for a rating of 0 a 100 and show it in the form:

  • Insufficient (Less than 50)
  • Enough (Of 50 a 69)
  • Good (Of 60 a 79)
  • Notable (Of 70 a 89)
  • Outstanding (Of 90 a 100)

Example of Results in the Exercise Console 4

Exercise 5.- Read a number and check if it is odd or even

Example of Results in the Exercise Console 5

Let's hope and these examples have been of great help.

Do not forget to follow us on social networks, to be aware of everything.

Follow Facialix on all his social networks:

Jesus Amaro

2 thoughts on "Basic Exercises in Java”

Leave a Reply

Your email address will not be published. Required fields are marked *

1 × three =