You are on page 1of 7

Experiment 01(a) – Installation Steps of JAVA

Learning Objectives: To understand the method of installing and configuring JAVA and testing
the same with the help of a simple program.

Theory:
Step 1: Verify that it is already installed or not

Check whether Java is already installed on the system or not.

Step 2: Download and Install JDK.

Open the executable file which you have just downloaded and follow the steps.
Step 3: Just Choose Development Tools and click Next.

Step 4 : Set the Permanent Path


To execute Java applications from command line, we need to set Java Path. To set the
path, follow the following steps.

Right click on "this PC". It can be named as "My Computer" in some systems.
Choose "properties" from the options.

Click on "Advanced system settings" to continue.

Click on "Environment Variables" to continue.


Enter "path" in variable name and enter the path to the bin folder inside your JDK
in the variable value. Click OK.

Now Java Path has been set up. Open the Command prompt and type "javac" In case
you have already open up the command prompt, I suggest you to close the existing
window and reopen it again.

HELLO WORLD PROGRAM:

import java.io.*;
public class Hello
{
Public Static void main (String args[])
{
System. out. Println(“Hello World”);
}
}

OUTPUT:
Experiment 01(b)–understanding the identifiers and keywords by
calculating square of a number.

In any programming language, identifiers are used for identification purposes. In Java, an identifier
can be a class name, method name, variable name, or label.

For example :

public class Sample


{
public static void main(String[] args)
{
int num = 1000;
}
}

In the above java code, we have 5 identifiers namely :


Sample: Class name.
main: method name.
String: Predefined class name.
args: Variable name.
num: Variable name.
PROGRAM:

OUTPUT:

Learning Outcomes: Students will able to


LO1.1 Understand the steps to download and configure java.
LO1.2 Remember and recall different features of java.
LO1.3 Differentiate between Procedural and Object-Oriented Programming Language.

Course Outcome:
CO1: Understand about Object Oriented Programming.
Conclusion:

Viva Questions:
1. What is byte code and class file?
2. What is JVM?
3. What is meant by object-oriented programming?

For Faculty Use only:

Correction Formative Timely completion Attendance / Total


Parameters Assessment of Practical [ 40%] Learning
[40%] Attitude [20%]
Marks
Obtained

You might also like