Java is another general purpose programming language and supports object-oriented programming concepts like polymorphism, inheritance, etc.
Java was created by Sun Microsystems and since then many programmers use Java programming language to write network-based applications and business applications. You can also write games using Java programming language.
A list of Java programs is given below for the following purpose
- Learn to program in Java by practicing these programs.
- Learn the Java programming concepts using these examples.
- Write similar programs on your own.
Prerequisites for Java Examples
Programming is all about doing, not just learning concepts and syntax of the programming languages. To learn Java you must use the practical approach – practice as many example programs you can. This will lay a strong foundation for you to learn higher and complex programs. To practice Java you need following.
- Java Compiler – there is two way to install a Java compiler. First, you can install NetBeans or Eclipse with latest Java Development Kit ( JDK ). Second, Install the latest JDK version and work with command line utility.
- Java Tutorial – before you practice example programs, learn the basic Java concepts to get started.
- Pen and Paper – if you try new inputs for example Java programs and want to verify the results, make use of pen and paper and solve the problem manually to verify outputs. Especially, in case of math programs it is true.
Java Example Programs
Topics for Java program listed here.
Java Math Programs
- Add Two Numbers
- Area Of A Triangle
- Area Of A Circle
- Average Of An Array
- Average Mark Of Students
- Addition Of Two Matrices