Arrays, Structures and Strings Learn programming Java

 Java exercises

 44 Reverse array
Create a Java program to ask the user for 5 numbers, store them in an array and show them in reverse order....
 57 Search in array
Create a Java program that says if a data belongs in a list that was previously created. The steps to take are: - Ask the user how many data will ...
 47 Array of even numbers
Write a Java program to ask the user for 10 integer numbers and display the even ones....
 43 Array of positive and negative numbers
Create a Java program to ask the user for 10 real numbers and display the average of the positive ones and the average of the negative ones....
 41 Many numbers and sum
Create a program which asks the user for several numbers (until he enters "end" and displays their sum). When the execution is going to end, it must d...
 44 Two dimensional array
Write a Java program to ask the user for marks for 20 pupils (2 groups of 10, using a two-dimensional array), and display the average for each group....
 43 Statistics V2
reate a statistical program which will allow the user to: - Add new data - See all data entered - Find an item, to see whether it has been entere...
 39 Struct
Create a "struct" to store data of 2D points. The fields for each point will be: x coordinate (short) y coordinate (short) r (red colour, byte) ...
 44 Array of struct
Expand the previous exercise (struct point), so that up to 1.000 points can be stored, using an "array of struct". Ask the user for data for the first...
 51 Array of struct and menu
Expand the previous exercise (array of points), so that it displays a menu, in which the user can choose to: - Add data for one point - Display al...
 53 Books database
Create a small database, which will be used to store data about books. For a certain book, we want to keep the following information: Title Author...
 36 Triangle V2
Write a Java program to ask the user for his/her name and display a triangle with it, starting with 1 letter and growing until it has the full length:...
 36 Rectangle V3
Write a Java program to ask the user for his/her name and a size, and display a hollow rectangle with it: Enter your name: Yo Enter size: 4 YoYoY...
 48 Centered triangle
Display a centered triangle from a string entered by the user: __a__ _uan_ Juan...
 51 Cities database
Create a database to store information about cities. In a first approach, we will store only the name of each city and the number of inhabitants, a...
 47 Banner
Create a Java program to imitate the basic Unix SysV "banner" utility, able to display big texts....
 37 Triangle right side
Create a Java program that asks the user for a string and displays a right-aligned triangle: ____n ___an __uan Juan...
 61 Strings manipulation
Create a Java program that asks the user for a string and: - Replace all lowercase A by uppercase A, except if they are preceded with a space - Di...
 44 Nested structs
Create a struct to store two data for a person: name and date of birth. The date of birth must be another struct consisting on day, month and ...
 43 Sort data
Create a Java program to ask the user for 10 integer numbers (from -1000 to 1000), sort them and display them sorted....
 56 Two dimensional array as buffer for screen
Create a Java program that declares a 70x20 two-dimensional array of characters, "draws" 80 letters (X, for example) in random positions and displays ...
 51 Two dimensional array 2: circunference on screen
Create a Java program that declares creates a 70x20 two-dimensional array of characters, "draws" a circumference or radius 8 inside it, and displays i...
 49 Computer programs
Create a Java program that can store up to 1000 records of computer programs. For each program, you must keep the following data: * Name * Categor...
 49 Exercise tasks
Create a Java program that can store up to 2000 "to-do tasks". For each task, it must keep the following data: • Date (a set of 3 data: day, month ...
 42 Household accounts
Create a program in Java that can store up to 10000 costs and revenues, to create a small domestic accounting system. For each expense (or income), sh...