Learn programming Java

 Top 10 most viewed Java exercises

 282 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...
 256 Java to Pascal converter
Create a program that converts simple Java programs, such as the following one, to the Pascal language....
 229 First contact with Java
Create a program (in Java) to print Hello on screen and then print your name (in a separate line)....
 182 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...
 171 BMP width & height, FileStream
Create a Java program to display the width and height of a BMP file using a FileStream. Remember the structure of the BMP header: File type (let...
 170 Pascal to Java translator
Create a basic Pascal to Java translator. It will accept program such as: example program; var i: integer; max: integer; begin writeLn("Ho...
 164 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...
 151 Conditional operator, positive & smaller
Create a Java program that asks the user for two numbers and answers, using the conditional operator (?), for the following: If the first number is...
 142 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...
 128 Table + SetOfTables + files
Expand the exercise from April 16th (tables + array + files) by creating three classes: Table, SetOfTables, and a test program. The SetOfTables class ...