Learn programming Java

 Top 10 most viewed Java exercises

 152 Java to Pascal converter
Create a program to convert simple Java programs, such as the following one, to Pascal language...
 147 Exceptions V2
Create a program to ask the user for a real number and display its square root. Errors must be trapped using "try..catch". Does it behave as you ex...
 111 First contact with Java
Create a program (in Java) to print Hello on screen and then print your name (in a separate line)....
 95 Reading a binay file (2 - GIF)
Create a Java program to check if a GIF image file seems to be correct. It must see if the first four bytes are G, I, F, 8. In case it seems cor...
 83 BMP width & height, FileStream
Create a Java program to display the width and the height of a BMP file, using a FileStream. Remember the structure of the header: File type (letter...
 79 Conditional operator, positive & smaller
Create a Java program which asks the user for two numbers and answers, using the conditional operator (?), the following: - If the first number is ...
 76 Friends database, using files
Expand the "friends database", so that it loads data from file at the beginning of each session (if the file exists) and saves the data to file when t...
 68 C to Java converter
Create a program to convert simple C programs, such as the following one, to Java: Note: the resulting program must compile correctly. Test it with o...
 62 Several multiplication tables, (use do while)
Display the multiplication tables from 2 to 6, using nested "do...while"....
 61 Break & continue
Create a Java program to write the even numbers from 10 to 20, both included, except 16, in 3 different ways: - Incrementing 2 in each step (use "c...