0% found this document useful (0 votes)
13 views32 pages

Lecture-1-Basics-of-Java

The document provides an introduction to Java, covering its history, features, and types of applications. It highlights Java's object-oriented nature, platform independence, and security, among other attributes. Additionally, it discusses the Java Development Kit (JDK), Java Virtual Machine (JVM), and various Java application types such as standalone, enterprise, web, and mobile applications.

Uploaded by

hanslebite
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views32 pages

Lecture-1-Basics-of-Java

The document provides an introduction to Java, covering its history, features, and types of applications. It highlights Java's object-oriented nature, platform independence, and security, among other attributes. Additionally, it discusses the Java Development Kit (JDK), Java Virtual Machine (JVM), and various Java application types such as standalone, enterprise, web, and mobile applications.

Uploaded by

hanslebite
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

INTRO TO JAVA

CPE 206L DATA STRUCTURE AND ALGORITHM


WENDY OLLERO-SANTOS, CCpE
SLIDESMANIA.COM
What is python?

a programming language DTP software

Spreadsheet software Computer


SLIDESMANIA.COM
Who created Python programming language ?

Mia Daniels Binod

Dennis Ritchie Guido van Rossum


SLIDESMANIA.COM
What extension is added to a python script file when
saving?

.pyt .pptx

.py .docx
SLIDESMANIA.COM
What symbol is used in python to assign values to a
variable?

Double equal == forward slash /

equals = asterisk *
SLIDESMANIA.COM
What would print (10 + 16) produce?

1016 26

10 + 16 24
SLIDESMANIA.COM
What will the output be from the following code?
print("3+4")

7 3+4

34 SyntaxError
SLIDESMANIA.COM
The correct way to write a variable in python?

my_variables=10 my_variable:10

my variable=10 my_variable is 10
SLIDESMANIA.COM
Which of the following is an invalid variable in python?

_Name StudNme

Stud Name Stud1Name


SLIDESMANIA.COM
What will be the datatype of the var in the below code snippet?

float and str number and str

int and str number and char


SLIDESMANIA.COM
In which language is Python written?

C++ Python

C English
SLIDESMANIA.COM
TOPICS

HISTORY OF TYPES OF JAVA JAVA TYPES OF JAVA IDE


JAVA
JAVA PLATFORM PLATFORM APPLICATIONS INSTALLATION
OVERVIEW
COMPONENTS

JAVA JAVA STRING CONDITIONAL LOOPING ARRAY


HELLO WORLD VARIABLES STATEMENTS STATEMENT
SLIDESMANIA.COM
JAVA - OVERVIEW
s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed! Java is a high-level, general-purpose, object-oriented, class-
based and secure programming language developed by
James Gosling at Sun Microsystems, Inc.
SLIDESMANIA.COM
HISTORY OF JAVA
● The Java language was initially called OAK.
s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed!
● Originally, it was developed for handling portable devices and set-top boxes.
● In 1995, Sun changed the name to "Java" and modified the language to take advantage of
the WWW (World Wide Web) development business.
● Later, in 2009, Oracle Corporation acquired Sun Microsystems and took ownership of three
key Sun software assets: Java, MySQL, and Solaris.
SLIDESMANIA.COM
Source: TIOBE

s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed!
SLIDESMANIA.COM
Source: PYPL

s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed!
SLIDESMANIA.COM
1. SIMPLE
11.
DYNAMIC 2. OBJECT
ORIENTED

10. MULTI-
THREADED 3.
PLATFORM
INDEPEND
s. We can build these lessons together and I am happy to model, co-teach, observe, and/or
ENT provide feedback to help you
succeed! FEATURES OF
9.
DISTRIBUT
ED JAVA 4.
SECURED

8. HIGH-
PERFORMA 5. ROBUST
NCE
6.
7. ARCHITECT
PORTABLE URE-
SLIDESMANIA.COM

NEUTRAL
FEATURES OF JAVA - SIMPLE
Javathese
s. We can build is very easy together
lessons to learn, and
andIits
amsyntax
happy is
to simple, clean andobserve,
model, co-teach, easy toand/or
understand because:
provide feedback to help you
succeed!
● Java syntax is based on C++ Java has removed many complicated and rarely-used features,
for example, explicit pointers, operator overloading, etc.
● There is no need to remove unreferenced objects because there is an Automatic Garbage
Collection in Java.
SLIDESMANIA.COM
FEATURES OF JAVA - OBJECT-ORIENTED
Object-oriented
s. We can build these lessonsprogramming
together and I(OOPs) is a to
am happy methodology that simplifies
model, co-teach, software
observe, and/or development
provide feedback to help you
succeed!
and maintenance by providing some rules.
● Object
● Class
● Inheritance
● Polymorphism
● Abstraction
● Encapsulation
SLIDESMANIA.COM
FEATURES OF JAVA - PLATFORM INDEPENDENT
● Java
s. We can build theseislessons
a writetogether
once, run
andanywhere language.
I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed!
● Java code can be executed on multiple platforms, for example, Windows, Linux, Sun Solaris,
Mac/OS, etc.
● Java code is compiled by the compiler and converted into bytecode.
SLIDESMANIA.COM
FEATURES OF JAVA - SECURED
Javathese
s. We can build is best known
lessons for its and
together security. With Java,
I am happy we can
to model, develop
co-teach, virus-free
observe, systems.
and/or provideJava is to help you
feedback
succeed!
secured because:
● No explicit pointer
● Java Programs run inside a virtual machine sandbox
SLIDESMANIA.COM
FEATURES OF JAVA - ROBUST
Java is robust because:
s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed! ● It uses strong memory management.
● There is a lack of pointers that avoids security problems.
● Java provides automatic garbage collection which runs on the Java Virtual Machine to get
rid of objects which are not being used by a Java application anymore.
● There are exception handling and the type checking mechanism in Java. All these points
make Java robust.
SLIDESMANIA.COM
FEATURES OF JAVA - ARCHITECTURE-NEUTRAL
s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed! Java is architecture neutral because there are no implementation dependent features, for
example, the size of primitive types is fixed.
SLIDESMANIA.COM
FEATURES OF JAVA - PORTABLE
s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed! Java is portable because it facilitates you to carry the Java bytecode to any platform. It doesn't
require any implementation.
SLIDESMANIA.COM
FEATURES OF JAVA - HIGH-PERFORMANCE
s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed! Java is faster than other traditional interpreted programming languages because Java
bytecode is "close" to native code. It is still a little bit slower than a compiled language (e.g.,
C++). Java is an interpreted language that is why it is slower than compiled languages, e.g., C,
C++, etc.
SLIDESMANIA.COM
FEATURES OF JAVA - DISTRIBUTED
s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed! Java is distributed because it facilitates users to create distributed applications in Java.
This feature of Java makes us able to access files by calling the methods from any machine on
the internet.
SLIDESMANIA.COM
FEATURES OF JAVA - MULTI-THREADED
s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed! A thread is like a separate program, executing concurrently. We can write Java programs that
deal with many tasks at once by defining multiple threads. The main advantage of multi-
threading is that it doesn't occupy memory for each thread. It shares a common memory area.
Threads are important for multi-media, Web applications, etc.
SLIDESMANIA.COM
FEATURES OF JAVA - DYNAMIC
s. We can build these lessons together and I am happy to model, co-teach, observe, and/or provide feedback to help you
succeed! Java is a dynamic language. It supports the dynamic loading of classes. It means classes are
loaded on demand. It also supports functions from its native languages, i.e., C and C++.
SLIDESMANIA.COM
TYPES OF JAVA PLATFORM
● Java
s. We can build theseStandard Editions
lessons together and(JSE): It is used
I am happy to create
to model, programs
co-teach, forand/or
observe, a desktop computer.
provide feedback to help you
succeed!
● Java Enterprise Edition (JEE): It is used to create large programs that run on the server
and manages heavy traffic and complex transactions.
● Java Micro Edition (JME): It is used to develop applications for small devices such as set-
top boxes, phone, and appliances.
SLIDESMANIA.COM
JAVA PLATFORM COMPONENTS
● Java Development kit (JDK) : JDK is a software development environment used for making
s. We can buildapplets and Java
these lessons applications.
together and I amJDK helps
happy to them
model,toco-teach,
code andobserve,
run Javaand/or
programs.
provide feedback to help you
succeed!
● Java Virtual Machine (JVM) : JVM is an engine that provides a runtime environment to drive
the Java Code or applications. It converts Java bytecode into machine language.
● Java Runtime Environment (JRE) : JRE is a piece of software that is designed to run other
software. It contains the class libraries, loader class, and JVM. In simple terms, if you want to
run a Java program, you need JRE.
SLIDESMANIA.COM
TYPES OF JAVA APPLICATIONS
● Standalone Applications: Java standalone applications uses GUI components such as AWT, Swing, and
s. We can buildJavaFX. These components
these lessons contain
together and I am buttons,
happy tolist, menu,co-teach,
model, scroll panel, etc. It isand/or
observe, also known as desktop
provide feedback to help you
succeed! alienations.
● Enterprise Applications: An application which is distributed in nature is called enterprise applications.
● Web Applications: An applications that run on the server is called web applications. We use JSP, Servlet,
Spring, and Hibernate technologies for creating web applications.
● Mobile Applications: Java ME is a cross-platform to develop mobile applications which run across
smartphones. Java is a platform for App Development in Android.
SLIDESMANIA.COM
THANKS!
Do you have any questions?
wendy.ollero@bulsu.edu.ph
SLIDESMANIA.COM

You might also like