Lecture 1 - First Program in Java
Java is a high-level, versatile, and widely used programming language. It was developed by Sun Microsystems (now owned by Oracle Corporation) and first released in 1995. Java is known for its platform independence, which means that programs written in Java can run on various computer systems without modification, as long as there is a compatible Java Virtual Machine (JVM) available for that system.
IMPORTANT:
👉No programming experience is required for this tutorial but if you have some programming experience in some other programming languages then obviously it will be beneficial.
👉It is strongly recommended to watch the youtube channel for better understanding of the topics/concepts discussed through out in this tutorial.
Key characteristics and features of Java include:
- Object-Oriented: Java is primarily an object-oriented programming (OOP) language, which means it emphasizes the use of classes and objects to model and solve real-world problems.
- Platform Independence: Java applications are compiled into an intermediate form called bytecode, which can be executed on any system with a compatible JVM. This "write once, run anywhere" feature is one of Java's most significant advantages.
- Automatic Memory Management: Java uses a garbage collector to automatically manage memory, making it easier for developers by eliminating many common memory-related errors like memory leaks.
- Rich Standard Library: Java comes with a vast standard library (Java Standard Library or Java API) that provides pre-built classes and methods for common tasks, making development more efficient.
- Multi-threading: Java supports multi-threading, allowing developers to create programs that can execute multiple tasks concurrently, enhancing performance in applications that require parallel processing.
- Security: Java has built-in security features that protect against various forms of malware and unauthorized access. Applets, for example, were once a common way to run Java programs within web browsers in a sandboxed environment.
- Portability: Java applications can run on various operating systems, including Windows, macOS, Linux, and more, as long as the JVM is available for that platform.
- Backward Compatibility: Java strives to maintain backward compatibility, ensuring that older Java applications continue to work on newer Java platforms with minimal modification.
Java is used in a variety of applications, including web development (using Java EE and Spring Framework), Android app development, enterprise software development, scientific computing, and more. It has remained a popular choice among developers for decades due to its versatility, reliability, and extensive ecosystem.
How to Install Java?
- Goto https://www.java.com/download/ie_manual.jsp. You will get a screen as below:
- Click on the "Download Java" button. It will ask the folder where you want to save the Java setup file after downloading.
- Click on the setup file once downloaded. It will install Java. No need to make any change during the installation process.
IDE (Integrated Development Environment) for Java
How to Install NetBeans?
- Goto https://netbeans.apache.org/download/index.html. You will get a screen as below. Download the latest version of Netbeens given on the website, At the time of writing this blog, the latest version is 'Apache NetBeans 18' released on May 30, 2023.
- Click on the "Download" button. It will display a screen as below:
- Click on the link mentioned in the above image.It will display a screen as below:
- Click on the link mentioned in the above image. It will ask the folder where you want to save the setup file after downloading.
- Click on the setup file once downloaded. It will install NetBeans. No need to make any change during the installation process.
Your First Program in Java
Once you have installed Java and NetBeans (or any other IDE for Java), now you are ready to write your first program in Java. A basic Java program has a specific structure that includes several essential components. Here's a typical structure for a simple Java program:
Next Lecture: How to Take Input From User
Further Readings:
👉 Who developed Java?
👉 What kind of applications are developed in Java?
👉 What is a high-level language?
👉 What is debugging?
👉 What is source code?
👉 What is object code?
👉 What is byte code?
👉 What are keywords?



Comments
Post a Comment