w3resource logo
Java Programming Exercises

Java Programming Exercises, Practice, Solution

Java Exercises

Java is the foundation for virtually every type of networked application and is the global standard for developing and delivering embedded and mobile applications, games, Web-based content, and enterprise software. With more than 9 million developers worldwide, Java enables you to efficiently develop, deploy and use exciting applications and services.

The best way we learn anything is by practice and exercise questions. Here you have the opportunity to practice the Java programming language concepts by solving the exercises starting from basic to more complex exercises. A sample solution is provided for each exercise. It is recommended to do these exercises by yourself first before checking the solution.

Hope, these exercises help you to improve your Java programming coding skills. Currently, following sections are available, we are working hard to add more exercises .... Happy Coding!

List of Java Exercises:

Note: If you are not habituated with Java programming you can learn from the following :

More to Come !

Popularity of Programming Language Worldwide, Jun 2017 compared to a year ago

PYPL Popularity of Programming Language Index:

Rank Change Language Share Trend
1 Java 22.7 % -1.2 %
2 Python 16.1 % +3.8 %
3 PHP 9.3 % -0.9 %
4 C# 8.2 % -0.6 %
5 Javascript 7.9 % +0.5 %
6 C++ 6.8 % -0.3 %
7 C 6.6 % -0.1 %
8 Objective-C 3.7 % -1.0 %
9 R 3.6 % +0.4 %
10 Swift 2.8 % -0.2 %
11 Matlab 2.5 % -0.1 %
12 Ruby 1.9 % -0.4 %
13 up arrow VBA 1.4 % -0.0 %
14 down arrow Visual Basic 1.4 % -0.3 %
15 up arrow TypeScript 1.3 % +0.6 %
16 Scala 1.2 % +0.2 %
17 down arrow Perl 0.8 % -0.3 %
18 up arrow Go 0.5 % +0.1 %
19 down arrow lua 0.4 % -0.1 %
20 down arrow Delphi 0.3 % -0.0 %
21 up arrow Rust 0.3 % -0.0 %
22 down arrow Haskell 0.3 % -0.0 %

Source : http://pypl.github.io/PYPL.html

Note: The PYPL Popularity of Programming Language Index is created by analyzing how often language tutorials are searched on Google.

TIOBE Index for June 2017:

Jun 2017 Jun 2016 Change Programming Language Ratings Change
1 1 Java 14.493% -6.30%
2 2 C 6.848% -5.53%
3 3 C++ 5.723% -0.48%
4 4 Python 4.333% +0.43%
5 5 C# 3.530% -0.26%
6 9 up arrow Visual Basic .NET 3.111% +0.76%
7 7 JavaScript 3.025% +0.44%
8 6 down arrow PHP 2.774% -0.45%
9 8 down arrow Perl 2.309% -0.09%
10 12 up arrow Assembly language 2.252% +0.13%
11 10 down arrow Ruby 2.222% -0.11%
12 14 up arrow Swift 2.209% +0.38%
13 13 Delphi/Object Pascal 2.158% +0.22%
14 16 up arrow R 2.150% +0.61%
15 48 up arrow Go 2.044% +1.83%
16 11 down arrow Visual Basic 2.011% -0.24%
17 17 MATLAB 1.996% +0.55%
18 15 down arrow Objective-C 1.957% +0.25%
19 22 up arrow Scratch 1.710% +0.76%
20 18 down arrow PL/SQL 1.566% +0.22%

Source : https://www.tiobe.com/tiobe-index/

Note: The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings.

List of Exercises with Solutions :

[ Want to contribute to Java exercises? Send your code (attached with a .zip file) to us at w3resource[at]yahoo[dot]com. Please avoid copyrighted materials.]