You are on page 1of 4

Chap 1 Object-oriented Programming with JAVA

Chapter 1
Object-Oriented Programming
with JAVA Topics covered:
 Introduction to JAVA
 Primitive data types
 Object & Class
 Inheritance
 Polymorphism

Chapter 1 – part 1
1 2

Chap 1 Introduction to JAVA

Introduction to JAVA Java


Programming  Released mid 1995 by Sun Microsystems, later
acquired by Oracle Corporation.
 Designed to be:
 A powerful, full-featured, pure OO development
language
 Easy to learn - syntax is similar to C++
 Platform independent
 Support development of applications for
networked environment
 Ideal for Web-based and Mobile applications

3 4
Chap 1 Introduction to JAVA Chap 1 Introduction to JAVA

Types of Java Applications Types of Java Applications


1.Standalone Application 2.Web Application
 Standalone applications are also known as desktop  An application that runs on the server side and
applications or window-based applications. creates a dynamic page is called a web application.
 These are traditional software that we need to install on  Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF,
every machine. Examples of standalone application are etc. technologies are used for creating web applications
Media player, antivirus, etc. in Java
 AWT and Swing are used in Java for creating standalone
applications

5 6

Chap 1 Introduction to JAVA Chap 1 Introduction to JAVA

Types of Java Applications Types of Java Applications


3.Enterprise Application 4.Mobile Application
 An application that is distributed in nature, such as  An application which is created for mobile devices is
banking applications, etc. is called enterprise application. called a mobile application.
 It has advantages of the high-level security, load  Currently, Android and Java ME are used for creating
balancing, and clustering. mobile applications
 In Java, EJB is used for creating enterprise applications

7 8
Chap 1 Introduction to JAVA Chap 1 Introduction to JAVA

Advantages of JAVA : Advantages of JAVA :


Rich Collection of Class Libraries Simplicity
 Hundreds of prewritten classes  Java is very easy to learn, and its syntax is simple, clean
 Provide methods to accomplish various tasks and easy to understand
 Java APIs (Application Programming Interfaces)  Java syntax is based on C++
 Improve program performance & shortens program  Java has removed many complicated and rarely-used
development time features.
Example; explicit pointers, operator overloading.
 Perform automatic memory management. Automatic
Object-oriented Garbage Collection in Java will automatically remove
 Encourages good software design unreferenced/unused objects to free up memory.
 Reduces debugging and maintenance

9 10

Chap 1 Introduction to JAVA Chap 1 Introduction to JAVA

Advantages of JAVA :
Portability
 Programs can be written and compiled once, then run
on different platforms
• Important for internet applications (applets)
 Achieved by using:
 Bytecode
• Produced when a Java program is compiled
 Interpreter (Java Virtual Machine – JVM)
• Execution environment for bytecode on each platform

11 12
Chap 1 Introduction to JAVA Chap 1 Introduction to JAVA

Building a Java Class Java Development Environment


Applets vs. Applications vs. Servlets  Java Development Kit
 Available from Oracle Web site: www.oracle.com
 Java SE Development Kit (JDK)
Applications Applications run on the client
 Includes: compiler JVM and prewritten classes
on their own
 Integrated Development Environments (IDEs)
Applets Applets run on the client in a  Provide:
browser  Sophisticated editors
 Debugging tools
 Graphical development tools
Servlets Servlets run on the server
 Eclipse (www.eclipse.org)
 NetBeans (www.netbeans.org)
 IntelliJ IDEA (www.jetbrains.com)

13 14

You might also like