1. Computing

Beginner Level

These exercises and questions target programmers who are new to Java. They focus on the basic building blocks of Java's syntax e.g., data types, loops, conditions, arrays, methods, objects, and so on.

Common Runtime Error
See if you can debug a piece of code that produces one of the most fundamental Java runtime errors.

Playing With Wrappers
Play around with wrapper classes in this simple exercise.

Literal Loop
Can you write loops using hexadecimal and octal literals?

Converting Strings
Test your ability to convert Strings to numbers.

Parsing Command-Line Arguments Question
Test your knowledge of command-line arguments by creating a program to parse for a specific parameter.

Counting Rabbits
Here's a idealistic way for counting rabbits – can you determine how many will exist after 20 generations?

The Infinite Loop
Can you rewrite this Java code so that there is no longer an infinite loop?

Breaking Out
Are you a fan of jumping out of loops? If so, where do you land after breaking out?

The Hailstone Sequence
A clever German mathematician created a simple formula that will produce what is sometimes known as the hailstone sequence. Can you write a program to display that sequence for a certain number?

Countries and Their Capitals
Can you get a user to pick a country from a list and then tell them what the capital city of the country they picked is?

Shifting Bits
How are you at shifting bits right and left?

Code Points
Try and discover which characters are represented by the Unicode code points.

Code Points (Part II)
Explore the characters produced by code points beyond the lower ranges.

Encoded First Line
I have cunningly encoded a first line from an Iain Banks book. Can you write a program to decode it?

Uncoded Line
This time rather than decoding a line, it's time to encode one.

The Collatz Theory
The hailstone sequence is back again. This program is designed to test Lothar Collatz's unproven theory.

Going Around and Around
Have you ever wanted to put your programs into a spin? Here's your chance.

Odd Magic Squares
Turtles, magic and squares will conspire to test your logic in this exercise.

Doubly-Even Magic Squares
Take the odd magic squares program one step further with another test of your programming logic.

Build a Simple Robocode Robot
It's time for some robot carnage.

©2014 About.com. All rights reserved.