Java Introduction
One idea behind Java's automatic memory management model is that programmers should be spared the burden of performing manual memory management. In some languages, the programmer allocates memory to create any object stored on the heap and is responsible for manually deallocating that memory to delete any such objects. If a programmer forgets to deallocate memory or writes code that fails to do so quickly, a memory leak can occur: the program will consume a potentially arbitrarily large amount of memory. Besides, if a memory region is deallocated twice, the program can become unstable and may crash. Finally, in non-garbage collected environments, there is a certain degree of overhead and complexity of user-code to track and finalize allocations.
Comparing Java and C++, it is possible in C++ to implement similar functionality (for example, a memory management model for specific classes can be designed in C++ to improve speed and lower memory fragmentation considerably), with the possible cost of extra development time and some application complexity. In Java, garbage collection is built-in and virtually invisible to the developer. That is, developers may have no notion of when garbage collection will occur as it may not necessarily correlate with any actions being explicitly performed by the code they write. Depending on the intended application, this can be beneficial or disadvantageous: the programmer is freed from performing low-level tasks but at the same time loses the option of writing lower-level code.
The syntax of Java is largely derived from C++. However, unlike C++, which combines the syntax for structured, generic, and object-oriented programming, Java was built from the ground up to be virtually fully object-oriented. Everything in Java is an object with the exceptions of atomic data types (ordinal and real numbers, boolean values, and characters), and everything in Java is written inside a class.
The Java Runtime Environment or JRE is the software required to run any application deployed on the Java Platform. End-users commonly use a JRE in software packages and Web browser plugins. Sun also distributes a superset of the JRE called the Java 2 SDK (more commonly known as the JDK), which includes development tools such as the Java compiler, Javadoc, and debugger.
Features of Java
- Object-Oriented
- Platform Independent
- Simple and Secure
- Architectural Neutral
- Portable
- Robust
- Multithreaded
- Interpreted
- High Performance
- Distributed
- Dynamic
How to setup Java Environment in Windows
There are certain requirements of hardware to run a java program.
Hardware Requirements (These are the minimum requirements):
- Computer with minimum 64 MB of RAM.
- Linux 7.1 or windows xp/7/8 operating system.
- Microsoft Notepad, eclipse or IntelliJ Idea, or any other editor.
- Java JDK 8.
Steps to install JDK:
- Open any browser.
- Search “Java JDK free download. “
- Open the one which is offered to you by oracle.com
- Download the latest version which is available according to your system, like Windows x64/x32 bit
- An exe file will be installed
- Run the exe file
- You are now good to go.
After installing the JDK, you need to set the path on your computer. Here are the steps:
- Right-click on ‘My Computer’ and select “Properties.”
- Click on the ‘Environment variables’ button under the ‘Advanced tab.
- Now, alter the path variable so that it also contains the path to the Java executable. For example, if your path is currently set to
Ç:\WINDOWS\SYSTEM32’ then change your path to Ç:\WINDOWS\SYSTEM32;c:\Program Files\java\jdk\bin’
After installing the JDK and setting the path, you must install Eclipse IDE or use any other IDE like IntelliJ or even Notepad.
Steps to download Eclipse :
- Open any browser.
- Search ‘free download eclipse ide.’
- Open the one which is provided to you by eclipse.com
- Download the version according to your system like x64/x32 bit
- An exe file will be installed
- Run the file
- Here you have to select Éclipse IDE for java developers
- Click on install.
- Now you are good to go.
You must be logged in to post a comment.