Lab 1
Lab 1
Objective:
● To learn to set up the work environment
● To write some test programs
● To familiarize with different settings of Netbeans
Instructions:
1. To execute Java program, you need JRE (Java Runtime Environment) to be installed in
your system.
2. To execute Java code, you need JDK (Java Development Kit) to be installed.
3. When you install JDK - JRE comes as bundled.
4. To write Java code, you can use any text editor like Notepad or sublime text. However, in
that case you will need to compile the code from command prompt and execute it from there.
That’s where IDE (Integrated Development Environment) comes in handy. From an IDE you
can write code, compile and execute it. For this course we will be using Netbeans as our IDE.
5. Netbeans will use JDK to compile and execute our code. So first, we will install JDK.
6. Go to this URL: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-
downloads-2133151.html
Accept license agreement and download appropriate JDK version.
7. Once downloaded, run it to begin the installation procedure. The process may take a
while depending on your system specification.
8. Now go to this URL:
https://netbeans.org/downloads/
Choose 32/64 bit version based on your system. Once downloaded, install and run Netbeans.
You are now ready to write some code.
Task:
1. Write a program that prints your name, age and department in console.
2. Write a program that prints from 1 to 10.
3. Write a program that determines if an integer is odd or even.