Basic Programming Examples
This page contains list of basic programming examples.
post
JavaScript examples
JavaScript is a browser-based scripting language. With JavaScript, you add behavior to the HTML documents and control the browser or change the HTML document.
The best way to learn JavaScript is to try many examples. JavaScript is also a complex programming language, it is not easy to learn JavaScript just because it is a browser language. You must practice lots of examples.
The examples are divided broadly into two categories – basic examples and object-oriented examples. The basic example demonstrates the fundamental concepts of JavaScript and object-oriented examples, you learn about object-oriented programming concepts.
Prerequisites
You need to complete certain prerequisites to get started with JS examples. These are tools and learning resources to help you learn JavaScript efficiently.
- JavaScript tutorial – you must be familiar with JavaScript concepts and the best way to learn is either visit our JavaScript tutorial page or get a good easy to follow JavaScript book with examples.
- Notepad – to write programs you need a text editor and browser can interpret the scripts easily. Download a new editor like Bracket, Sublime Text, Notepad++ or use builtin text editors – Notepad or Text Edit in Mac.
- Browser – you need to install a browser to test you JavaScript code. You can download free browsers from internet like Chrome, Mozilla Firefox, UC Browser, Microsoft Edge, etc.
JavaScript exercises
Sub topics for JavaScript listed below.
JavaScript Basic Examples
JavaScript Object Exercises
JavaScript Algorithm Examples
JavaScript Projects
- Binary To Decimal Converter
- Decimal To Binary Converter
JavaScript References
post
Java Examples
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
Java String Programs
Java Operators
Java Arrays
Java OOP Examples
post