Lab#01
Lab#01
Date: 28thJan2025
Time: 9:00am- 12:00pm
Objectives
Your first activity will be creating the "Hello World" program using Java.
Tools/Software Requirement
NetBeans. Eclipse, VS Code,IntelliJ IDEA
Description
What is Java?
Why Java:
Java is widely used due to its platform independence, as programs can run on any machine with
the Java Virtual Machine (JVM) installed. It is an object-oriented language, promoting reusable,
maintainable, and modular code. Java also offers robust security features like sandboxing and
bytecode verification, making it safe for distributed applications. Its rich API covers everything
from networking to UI components, helping developers create powerful applications. With
multithreading support, Java enables efficient, responsive programs, while Just-In-Time (JIT)
compilation enhances performance. The large Java community and its cross-platform capabilities
further contribute to its popularity and effectiveness in software development.
JVM
JVM (Java Virtual Machine) is an abstract machine. It is called a virtual machine because it doesn't
physically exist. It is a specification that provides a runtime environment in which Java bytecode
can be executed. It can also run those programs which are written in other languages and compiled
to Java bytecode.
JVMs are available for many hardware and software platforms. JVM, JRE, and JDK are platform
dependent because the configuration of each OS is different from each other. However, Java is
platform independent. There are three notions of the JVM: specification, implementation,
and instance.
JRE
JDK
JDK is an acronym for Java Development Kit. The Java Development Kit (JDK) is a software
development environment which is used to develop Java applications and applets. It physically
exists. It contains JRE + development tools.
For this task, you can choose from the following popular Integrated Development Environments
(IDEs):
1. NetBeans
Screenshots of Steps:
Save the file, and open command window to use for compiling and running your program. In the
new window, navigate into your CS-212 directory and issue the following command to compile
the program
Demo:
https://www.youtube.com/watch?v=uA4eQbC3JgA
Error Handling:
https://www.youtube.com/watch?v=lITsZKidY1s&list=PL8p2I9Gkl
V466xs0qGUvLGAXy6xLyEcQy&index=3
OUTPUT:
Try it….
Print a Butterfly
Print a Fish:
Print a Sun:
Print a Cat:
Deliverables: