2
Most read
3
Most read
4
Most read
INTRODUCTION OF JAVA
Java is an object oriented programming language. Originally called Oak, Java was designed
for the development of software for consumer electronic devices like TVs, VCRs, toaster etc.
Although Java was modeled after C and C++ languages, it differs form C and C++ in many
ways.
The Four Types of Java Applications
The following are the four types of applications you can build in Java:
 Applets (mini applications)
 GUI applications
 Command line applications
 Packages (libraries)
Java is a general purpose; object oriented programming language developed by Sun
Microsystems of USA in 1991.
JAVA FEATURES
The inventers of Java wanted to design a language which could offer solutions to some of the
problems encountered in modern programming. Sun Micro-systems officially describe Java
with the following attributes:
 Simple & Familiar
 Secure
 Compiled & Interpreted
 Platform-independent & Portable
 Object-oriented
 Robust
 Distributed
 Multithreaded
 High performance
 Dynamic & Extensible
SIMPLE AND FAMILIAR
 Java was designed to be easy for professional programmer to learn and use
effectively.
 Java inherits the C/C++ syntax and many of the OOPs features of C++. In Java, there are
a small number of clearly defined ways to accomplish a given task.
SECURE.
 Java systems not only verify all memory access but also ensure that no viruses are
communicated with an applet.
 The absence of pointers in Java ensures that programs can not gain access to memory
without proper authorization.
COMPILED AND INTERPRETED
Usually a computer language is either compiled or interpreted. Java combines both compiled
& interpreted, these approaches thus making Java a two stage system.
1. COMPILATION
 Java compiler translates source code into bytecode instructions.
 Bytecode- Bytecode is a highly optimized set of instructions designed to be executed by
the Java run time system, which is called the Java virtual machine (JVM).
2. INTERPRETATION
 JVM is an interpreter for bytecode. Java program is executed by the JVM. It generates
machine code that can be directly executed by the machine.
PLATFORM INDEPENDENT & PORTABLE
 Java programs can be easily moved from one computer system to another, anywhere and
anytime.
 Changes and upgrades in operating system processor and system resources will not force
any changes in java programs.
 This is the reason by Java has become a popular language on internet. We can download a
Java Applet from a remote computer onto our local system via Internet & execute it
locally.
 Java compiler generates bytecode instructions that can be implemented on any machine.
JAVA IS OBJECT-ORIENTED
 Java is a true object-oriented language. Almost everything in java is an object.All
program code and data reside within object and classes. Therefore, it's part of a family of
languages that focuses on defining data as objects and the methods that may be applied to
those objects.
 Many OOP languages support multiple inheritance, which can sometimes lead to
confusion or unnecessary complications. Java doesn't. Java supports only single
inheritance. Java allows you to create totally abstract classes known as interfaces.
 Polymorphism.
 Abstraction.
 Encapsulation.
ROBUST
 Java is a robust language.
 It provides many safeguards to ensure reliable code.
 Java also incorporates the concept of exception handling which captures series errors &
eliminates any risk of crashing the system.
DISTRIBUTED
 Java is designed as a distributed language for creating application on network .
 It has the ability to share both data and programs.
 Java has revived interfaces in a package called Remote Method Invocation (RMI). This
feature brings an unparalleled level of abstraction to client/server programing.
MULTITHREADED & INTERRACTIVE
 Multithreaded means handling multiple tasks simultaneously .
 Java supports multithreaded programming We need not wait for the application to finish
one task before beginning another.
 Java runtime comes with tools that support multiproccess synchronization & construct
smoothly running interactive systems.
DYNAMIC & EXTENSIBLE
 Java is a dynamic language.
 Java is capable of dynamically linking in new class libraries, methods and objects.
 Java can also determine the type of class through a query, making it possible to either
dynamically link or abort depending on the response.
HIGH PERFORMANCE
 Java performance is impressive for an interpreted language, mainly due to the use of
intermediate bytecode.
 The Java bytecode was carefully designed so that it would be easy to translate directly
into native machine code for very high performance by using a just-in-time compiler.
HOW JAVA DIFFER FROM C AND C++
Java is a true object oriented language while c++ is basically C with object oriented
extension.
 Java does not support operator overloading.
 Java adds new operators such as instanceof and >>>
 Java adds labbelled break and continue statements.
 Java does not contain the data types stuct, union and enum.
 Java does not have any preprocessor like #define , #include.
 Java does not have template classes as in C++.
 Java does not support multiple inheritances of classes. This is accomplished using a
new feature called “interface”.
 Java does not support global variables. Every method and variable is declared within a
class.
 Java does not use pointers.
 Java has replaced the destructor function with a finalize () function.
 There are no header files in Java.
Steps to set path
1. Open command prompt
2. Copy the path of jdk: c:>program filesjavajdk1.8.0_181bin
3. Enter into your folder where your file is stored by using CD
command.
4. path= paste copied path like c:>program
filesjavajdk1.8.0_181bin
HelloWorld! simple Java Programs
public class HelloWorld
{
public static void main(String args[])
{
System.out.println("Hello World!!");
}
}
How to start working with Java
1. Create the File
The first step to create the HelloWorld application is to copy the text into a file called
HelloWorld.java using your favorite text editor like notepad.
2. Compile the Code
To compile the program, you need to first install the JDK. Then, use the program javac
included with the JDK to convert the text. To run javac, on a Macintosh drag the source file
over the javac icon at a command prompt. The javac program creates a file called
HelloWorld.class from the HelloWorld.java file. Inside this file (HelloWorld.class) is text
known as bytecodes which can be run by the Java interpreter.
javac HelloWorld.java
3. Run the Programa
Now that you have compiled the program, you can run it by typing at the command prompt:
java HelloWorld
After you do this, the computer should print to the screen
Hello World!!

More Related Content

PPTX
Unit1 JAVA.pptx
PPT
Java presentation
PPTX
JAVA ALL 5 MODULE NOTES.pptx
PPTX
Java ms harsha
PPT
Core Java Slides
PPT
Core java slides
PDF
0f0cef_1dac552af56c4338ab0672859199e693.pdf
Unit1 JAVA.pptx
Java presentation
JAVA ALL 5 MODULE NOTES.pptx
Java ms harsha
Core Java Slides
Core java slides
0f0cef_1dac552af56c4338ab0672859199e693.pdf

Similar to java introduction.docx (20)

PPTX
Java Lecture 1
PDF
Java Evolution-2.pdf
PPT
Chapter 1 introduction to java technology
PPTX
Unit1 introduction to Java
PPTX
Java part1
DOCX
Java Tutorial to Learn Java Programming
PPTX
Java Programming Tutorials Basic to Advanced 1
PPT
Java features
PPTX
Java Intro
PDF
Java Programming
PDF
Introduction to Java Programming.pdf
PPTX
JAVA PROGRAMMING-Unit I - Final PPT.pptx
PPTX
JAVA FEATURES
PPTX
Features of java unit 1
DOCX
Notes of java first unit
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PDF
Java chapter 1
PDF
130700548484460000
PPTX
DIT 206 LECTURE 2 - Features of the Java Programming Language copy.pptx
PDF
Java Programming Basics
Java Lecture 1
Java Evolution-2.pdf
Chapter 1 introduction to java technology
Unit1 introduction to Java
Java part1
Java Tutorial to Learn Java Programming
Java Programming Tutorials Basic to Advanced 1
Java features
Java Intro
Java Programming
Introduction to Java Programming.pdf
JAVA PROGRAMMING-Unit I - Final PPT.pptx
JAVA FEATURES
Features of java unit 1
Notes of java first unit
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
Java chapter 1
130700548484460000
DIT 206 LECTURE 2 - Features of the Java Programming Language copy.pptx
Java Programming Basics
Ad

Recently uploaded (20)

PPTX
text mining_Natural Language Processing.pptx
PPTX
An Introduction to Lean Six Sigma for Bilginer
PDF
Machine Learning Final Summary Cheat Sheet
PPT
Technicalities in writing workshops indigenous language
PPTX
ISO 9001-2015 quality management system presentation
PPTX
logistic__regression_for_beginners_.pptx
PPTX
4. Sustainability.pptxxxxxxxxxxxxxxxxxxx
PPTX
1.Introduction to orthodonti hhhgghhcs.pptx
PPTX
DataGovernancePrimer_Hosch_2018_11_04.pptx
PPT
Handout for Lean and Six Sigma application
PDF
TenneT-Integrated-Annual-Report-2018.pdf
PPT
DWDM unit 1 for btech 3rd year students.ppt
PPTX
PSU research training.pptxPSU research training.pptx
PPTX
REAL of PPT_P1_5019211081 (1).pdf_20250718_084609_0000.pptx
PDF
PPT IEPT 2025_Ms. Nurul Presentation 10.pdf
PDF
Lesson 1 - intro Cybersecurity and Cybercrime.pptx.pdf
PPTX
Transport System for Biology students in the 11th grade
PDF
NU-MEP-Standards معايير تصميم جامعية .pdf
PPTX
Microsoft Fabric Modernization Pathways in Action: Strategic Insights for Dat...
PDF
PPT nikita containers of the company use
text mining_Natural Language Processing.pptx
An Introduction to Lean Six Sigma for Bilginer
Machine Learning Final Summary Cheat Sheet
Technicalities in writing workshops indigenous language
ISO 9001-2015 quality management system presentation
logistic__regression_for_beginners_.pptx
4. Sustainability.pptxxxxxxxxxxxxxxxxxxx
1.Introduction to orthodonti hhhgghhcs.pptx
DataGovernancePrimer_Hosch_2018_11_04.pptx
Handout for Lean and Six Sigma application
TenneT-Integrated-Annual-Report-2018.pdf
DWDM unit 1 for btech 3rd year students.ppt
PSU research training.pptxPSU research training.pptx
REAL of PPT_P1_5019211081 (1).pdf_20250718_084609_0000.pptx
PPT IEPT 2025_Ms. Nurul Presentation 10.pdf
Lesson 1 - intro Cybersecurity and Cybercrime.pptx.pdf
Transport System for Biology students in the 11th grade
NU-MEP-Standards معايير تصميم جامعية .pdf
Microsoft Fabric Modernization Pathways in Action: Strategic Insights for Dat...
PPT nikita containers of the company use
Ad

java introduction.docx

  • 1. INTRODUCTION OF JAVA Java is an object oriented programming language. Originally called Oak, Java was designed for the development of software for consumer electronic devices like TVs, VCRs, toaster etc. Although Java was modeled after C and C++ languages, it differs form C and C++ in many ways. The Four Types of Java Applications The following are the four types of applications you can build in Java:  Applets (mini applications)  GUI applications  Command line applications  Packages (libraries) Java is a general purpose; object oriented programming language developed by Sun Microsystems of USA in 1991. JAVA FEATURES The inventers of Java wanted to design a language which could offer solutions to some of the problems encountered in modern programming. Sun Micro-systems officially describe Java with the following attributes:  Simple & Familiar  Secure  Compiled & Interpreted  Platform-independent & Portable  Object-oriented  Robust  Distributed  Multithreaded  High performance  Dynamic & Extensible SIMPLE AND FAMILIAR  Java was designed to be easy for professional programmer to learn and use effectively.  Java inherits the C/C++ syntax and many of the OOPs features of C++. In Java, there are a small number of clearly defined ways to accomplish a given task. SECURE.  Java systems not only verify all memory access but also ensure that no viruses are communicated with an applet.  The absence of pointers in Java ensures that programs can not gain access to memory without proper authorization. COMPILED AND INTERPRETED
  • 2. Usually a computer language is either compiled or interpreted. Java combines both compiled & interpreted, these approaches thus making Java a two stage system. 1. COMPILATION  Java compiler translates source code into bytecode instructions.  Bytecode- Bytecode is a highly optimized set of instructions designed to be executed by the Java run time system, which is called the Java virtual machine (JVM). 2. INTERPRETATION  JVM is an interpreter for bytecode. Java program is executed by the JVM. It generates machine code that can be directly executed by the machine. PLATFORM INDEPENDENT & PORTABLE  Java programs can be easily moved from one computer system to another, anywhere and anytime.  Changes and upgrades in operating system processor and system resources will not force any changes in java programs.  This is the reason by Java has become a popular language on internet. We can download a Java Applet from a remote computer onto our local system via Internet & execute it locally.  Java compiler generates bytecode instructions that can be implemented on any machine. JAVA IS OBJECT-ORIENTED  Java is a true object-oriented language. Almost everything in java is an object.All program code and data reside within object and classes. Therefore, it's part of a family of languages that focuses on defining data as objects and the methods that may be applied to those objects.  Many OOP languages support multiple inheritance, which can sometimes lead to confusion or unnecessary complications. Java doesn't. Java supports only single inheritance. Java allows you to create totally abstract classes known as interfaces.  Polymorphism.  Abstraction.  Encapsulation. ROBUST  Java is a robust language.  It provides many safeguards to ensure reliable code.  Java also incorporates the concept of exception handling which captures series errors & eliminates any risk of crashing the system. DISTRIBUTED  Java is designed as a distributed language for creating application on network .  It has the ability to share both data and programs.  Java has revived interfaces in a package called Remote Method Invocation (RMI). This feature brings an unparalleled level of abstraction to client/server programing.
  • 3. MULTITHREADED & INTERRACTIVE  Multithreaded means handling multiple tasks simultaneously .  Java supports multithreaded programming We need not wait for the application to finish one task before beginning another.  Java runtime comes with tools that support multiproccess synchronization & construct smoothly running interactive systems. DYNAMIC & EXTENSIBLE  Java is a dynamic language.  Java is capable of dynamically linking in new class libraries, methods and objects.  Java can also determine the type of class through a query, making it possible to either dynamically link or abort depending on the response. HIGH PERFORMANCE  Java performance is impressive for an interpreted language, mainly due to the use of intermediate bytecode.  The Java bytecode was carefully designed so that it would be easy to translate directly into native machine code for very high performance by using a just-in-time compiler. HOW JAVA DIFFER FROM C AND C++ Java is a true object oriented language while c++ is basically C with object oriented extension.  Java does not support operator overloading.  Java adds new operators such as instanceof and >>>  Java adds labbelled break and continue statements.  Java does not contain the data types stuct, union and enum.  Java does not have any preprocessor like #define , #include.  Java does not have template classes as in C++.  Java does not support multiple inheritances of classes. This is accomplished using a new feature called “interface”.  Java does not support global variables. Every method and variable is declared within a class.  Java does not use pointers.  Java has replaced the destructor function with a finalize () function.  There are no header files in Java. Steps to set path 1. Open command prompt 2. Copy the path of jdk: c:>program filesjavajdk1.8.0_181bin
  • 4. 3. Enter into your folder where your file is stored by using CD command. 4. path= paste copied path like c:>program filesjavajdk1.8.0_181bin HelloWorld! simple Java Programs public class HelloWorld { public static void main(String args[]) { System.out.println("Hello World!!"); } } How to start working with Java 1. Create the File The first step to create the HelloWorld application is to copy the text into a file called HelloWorld.java using your favorite text editor like notepad. 2. Compile the Code To compile the program, you need to first install the JDK. Then, use the program javac included with the JDK to convert the text. To run javac, on a Macintosh drag the source file over the javac icon at a command prompt. The javac program creates a file called HelloWorld.class from the HelloWorld.java file. Inside this file (HelloWorld.class) is text known as bytecodes which can be run by the Java interpreter. javac HelloWorld.java 3. Run the Programa Now that you have compiled the program, you can run it by typing at the command prompt: java HelloWorld After you do this, the computer should print to the screen Hello World!!