SlideShare a Scribd company logo
JAVA
SUJIT MAJETY | 1 : INTRODUCTION TO JAVA
Course Description


Introduction to JAVA



Location : SREC



History



Lectures: Weekdays at 11:00 am



Features



Labs: Weekdays at 01:30 pm



JVM



Presenter:



Architecture of JVM



Introduction to OOPS



Object



Class

Sujit Majety,
Software Engineer,
Tech Fort IT Solutions (INDIA) PVT Ltd.
Introduction to JAVA


Let’s start the exiting journey.



Java is one of the most powerful programming languages.



Java is Cross-platform, object-oriented, network-based, reliable programming
language.



The slogan of java is “write once and run anywhere”, this allowed java to gain
enormous popularity. Its rapid ascensation and wide acceptance can be traced to its
design and programming features.



The name “JAVA” came from the name of the coffee seed.



JAVA released to market in three versions J2SE, J2EE, J2ME
Programming Paradigm
Procedure Oriented


More emphasis on algorithms.



Programs divided into functions.



Most functions share data, less security to
data.



Data move around the system between
functions, any function can change the data.



Adding new code is very difficult.



Code cannot be re-used.



E.g. C, VB, Perl, Basic, Fortran

Object Oriented


More emphasis on data.



Programs are divided into objects.



Functions operate on data are tied together
in the data structure.



Data is secured; it is hidden to external
functions, can be accessed by functions
tied to it.



Adding new code is very easy.



Code can be re-used.



E.g. CPP, Java, VB.Net, C#.Net
History


Developed by a team led by James Gosling at Sun Microsystems.



Sun Microsystems was a company best known for its workstations.



Java was originally OAK, designed for use in embedded consumer electronic
application in 1991.



OAK was redesigned for developing internet applications and renamed JAVA in
1995.



Java is inherently object-oriented.
Features
There are eleven promising features in java


Simple (no pointers, interfaces, rich set of API, friendly syntaxes)



Secure (many number of security mechanisms to block stray programs)



Portable (can run on any operating system)



Robust (memory management, exceptional handling)



Distributed (runs on multiple servers and can be accessed by no of clients)



Interpreted (both compiled and interpreted)



Multi Threading (multiple flow of controls)



Dynamic (is always open for updating)



Architecture Neutral (can run on any processor)



High Performance (garbage collector, leaves resources wile waiting for inputs)



Object oriented (everything is written in class)
Java Virtual Machine


JVM is an abstract machine.



It is a specification that provides runtime environment in which java byte code can be
executed.



JVM’s are available for many hardware and software platforms (i.e. JVM is platform
dependant).



JVM performs four main tasks,


Loads code



Verifies code



Executes code



Provides runtime environment.
Architecture of JVM
Class Loader
Subsystem

Class Files

Runtime
data
areas

Method
Area

Execution Engine

Heap

Stack

PC
Registers

Native
Method
Area
Introduction to OOPS


Object oriented programming models the real world.



Object oriented programming organizes a program around its data and set of well
defined interfaces to that data.



An object-oriented program can be characterized as data controlling access to
code.



By switching the controlling entity to data, you can achieve several organizational
benefits.



Object oriented programming, the first letter indicates object.



What is an object?
Object


An object is the basic unit of object orientation with behaviour and identity.



An object is a real time entity. E.g.. Car, bike, book, me and you.



It is a runtime entity that has a state and behaviour.



The state of the object represents the data.



The behaviour is represented by the methods.



E.g. An object is created to represent a rabbit.
It would have data: how hungry it is, where it is.
And methods : eat, hide, run and dig.
Class


A class is a way of binding the data and associated methods into a single unit.



A class can also be said as a blue print to create an object.



If we want to develop a java program, then that should be developed with respective of
class only. i.e. without class there is no java program.



Syntax:

Class <clsname>
{
Variable declaration;

Class Name

Animal

Data members/
properties/
Attributes

Name,
Number of legs,
Colour

Behaviours/
Methods

Eat(),
Walk(),
Sleep()

Methods definition;
};
Sample Program
class Test
{
public static void main(String[] args)
{
System.out.println(“Hello World”);
}
}
Execution:
> javac Test.java
> java Test
Execution of java program


The java program execution can be seen through the following
figure.

Test.java

Test.class

JVM

Java Program
Source code

Byte code

JVM converts byte
code to m/c code

Console

Program Output
Important Interview Questions


What is the most widely used protocol on internet



What is the difference between an executable file and .class file?



Why java is suitable for internet?



Why pointers are eliminated in java?



What is the difference between a function and a method?



Which part of the JVM will allocate the memory for java program?



Which algorithm is used by garbage collector to remove the unused variables or objects
from memory?
Assignments


Check the hello world program by removing each and every word.



Shuffle the order of public static void main



Try experimenting with print & println.



Try giving different names for args.



Try giving int args[] instead of String args[] in main.



Give Different name for the filename and the class name



Repeat the above problem with declaring class as public



Copy the class file into different folder name and execute it.



Write your own program, compile it and execute it.



Try giving different data types ( the one you know like int x, double d ) in the prinltn and see if it prints all of
them.



I have two Integers int x =1; and int x=2; I wish to print 12. find the ways to print.



Repeat the same if I want to print given int x=1; double d=2.5; and print 12 instead of 12.5
Questions?
Sujit Majety
+91 9000019878
mail to : sujit.naga@gmail.com

More Related Content

PPT
00 intro to java
PDF
Core java course syllabus
PPT
Java basics
PDF
Core Java Tutorial
PPTX
Core java online training
PPT
Java features
PPSX
Introduction of java
PPT
00 intro to java
Core java course syllabus
Java basics
Core Java Tutorial
Core java online training
Java features
Introduction of java

What's hot (20)

PPTX
core java
PPTX
Java seminar
PPTX
Introduction to java
DOC
Grade 8: Introduction To Java
PDF
Core Java
DOCX
Java and its features
PPT
Java Programming for Designers
PPT
Core java slides
PPTX
Java Programming
PPTX
Java programming(unit 1)
PDF
Introduction to Java Programming Language
PPTX
PPTX
basic core java up to operator
PPT
Java Presentation
PDF
Introduction to Java
PPT
Java for C++ programers
PPTX
Java programming course for beginners
PPT
INTRODUCTION TO JAVA APPLICATION
PDF
Genesis and Overview of Java
core java
Java seminar
Introduction to java
Grade 8: Introduction To Java
Core Java
Java and its features
Java Programming for Designers
Core java slides
Java Programming
Java programming(unit 1)
Introduction to Java Programming Language
basic core java up to operator
Java Presentation
Introduction to Java
Java for C++ programers
Java programming course for beginners
INTRODUCTION TO JAVA APPLICATION
Genesis and Overview of Java
Ad

Viewers also liked (7)

PPTX
Brinkman Assignment 5 PTA Presentation
PPT
Present simple
PPT
Java intro
DOCX
Green land convent school
PPTX
Multithreaded programming
PPT
Assembler
PPT
Linux webmin
Brinkman Assignment 5 PTA Presentation
Present simple
Java intro
Green land convent school
Multithreaded programming
Assembler
Linux webmin
Ad

Similar to Introduction to java (20)

PDF
Introduction to java (revised)
PDF
Java programming material for beginners by Nithin, VVCE, Mysuru
PPTX
PPTX
Java Programming concept
PPTX
object oriented programming unit one ppt
PPTX
oop unit1.pptx
PPTX
introduction to object orinted programming through java
DOCX
Java notes
PPTX
Java Basics
PPT
Basics-Of-Java
PDF
JAVA PPT-1 BY ADI.pdf
PDF
JAVA PPT Part-1 BY ADI.pdf
PPT
PPTX
JAVA_VR23_OOPS THROUGH JAVA PPT UNIT-1.pptx
PPT
Introduction to Java Programming, Basic Structure, variables Data type, input...
PPTX
Basics of JAVA programming
Introduction to java (revised)
Java programming material for beginners by Nithin, VVCE, Mysuru
Java Programming concept
object oriented programming unit one ppt
oop unit1.pptx
introduction to object orinted programming through java
Java notes
Java Basics
Basics-Of-Java
JAVA PPT-1 BY ADI.pdf
JAVA PPT Part-1 BY ADI.pdf
JAVA_VR23_OOPS THROUGH JAVA PPT UNIT-1.pptx
Introduction to Java Programming, Basic Structure, variables Data type, input...
Basics of JAVA programming

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
A Presentation on Artificial Intelligence
PDF
Modernizing your data center with Dell and AMD
PDF
Approach and Philosophy of On baking technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
A Presentation on Artificial Intelligence
Modernizing your data center with Dell and AMD
Approach and Philosophy of On baking technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
NewMind AI Monthly Chronicles - July 2025
Chapter 3 Spatial Domain Image Processing.pdf
cuic standard and advanced reporting.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Unlocking AI with Model Context Protocol (MCP)
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Per capita expenditure prediction using model stacking based on satellite ima...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Review of recent advances in non-invasive hemoglobin estimation

Introduction to java

  • 1. JAVA SUJIT MAJETY | 1 : INTRODUCTION TO JAVA
  • 2. Course Description  Introduction to JAVA  Location : SREC  History  Lectures: Weekdays at 11:00 am  Features  Labs: Weekdays at 01:30 pm  JVM  Presenter:  Architecture of JVM  Introduction to OOPS  Object  Class Sujit Majety, Software Engineer, Tech Fort IT Solutions (INDIA) PVT Ltd.
  • 3. Introduction to JAVA  Let’s start the exiting journey.  Java is one of the most powerful programming languages.  Java is Cross-platform, object-oriented, network-based, reliable programming language.  The slogan of java is “write once and run anywhere”, this allowed java to gain enormous popularity. Its rapid ascensation and wide acceptance can be traced to its design and programming features.  The name “JAVA” came from the name of the coffee seed.  JAVA released to market in three versions J2SE, J2EE, J2ME
  • 4. Programming Paradigm Procedure Oriented  More emphasis on algorithms.  Programs divided into functions.  Most functions share data, less security to data.  Data move around the system between functions, any function can change the data.  Adding new code is very difficult.  Code cannot be re-used.  E.g. C, VB, Perl, Basic, Fortran Object Oriented  More emphasis on data.  Programs are divided into objects.  Functions operate on data are tied together in the data structure.  Data is secured; it is hidden to external functions, can be accessed by functions tied to it.  Adding new code is very easy.  Code can be re-used.  E.g. CPP, Java, VB.Net, C#.Net
  • 5. History  Developed by a team led by James Gosling at Sun Microsystems.  Sun Microsystems was a company best known for its workstations.  Java was originally OAK, designed for use in embedded consumer electronic application in 1991.  OAK was redesigned for developing internet applications and renamed JAVA in 1995.  Java is inherently object-oriented.
  • 6. Features There are eleven promising features in java  Simple (no pointers, interfaces, rich set of API, friendly syntaxes)  Secure (many number of security mechanisms to block stray programs)  Portable (can run on any operating system)  Robust (memory management, exceptional handling)  Distributed (runs on multiple servers and can be accessed by no of clients)  Interpreted (both compiled and interpreted)  Multi Threading (multiple flow of controls)  Dynamic (is always open for updating)  Architecture Neutral (can run on any processor)  High Performance (garbage collector, leaves resources wile waiting for inputs)  Object oriented (everything is written in class)
  • 7. Java Virtual Machine  JVM is an abstract machine.  It is a specification that provides runtime environment in which java byte code can be executed.  JVM’s are available for many hardware and software platforms (i.e. JVM is platform dependant).  JVM performs four main tasks,  Loads code  Verifies code  Executes code  Provides runtime environment.
  • 8. Architecture of JVM Class Loader Subsystem Class Files Runtime data areas Method Area Execution Engine Heap Stack PC Registers Native Method Area
  • 9. Introduction to OOPS  Object oriented programming models the real world.  Object oriented programming organizes a program around its data and set of well defined interfaces to that data.  An object-oriented program can be characterized as data controlling access to code.  By switching the controlling entity to data, you can achieve several organizational benefits.  Object oriented programming, the first letter indicates object.  What is an object?
  • 10. Object  An object is the basic unit of object orientation with behaviour and identity.  An object is a real time entity. E.g.. Car, bike, book, me and you.  It is a runtime entity that has a state and behaviour.  The state of the object represents the data.  The behaviour is represented by the methods.  E.g. An object is created to represent a rabbit. It would have data: how hungry it is, where it is. And methods : eat, hide, run and dig.
  • 11. Class  A class is a way of binding the data and associated methods into a single unit.  A class can also be said as a blue print to create an object.  If we want to develop a java program, then that should be developed with respective of class only. i.e. without class there is no java program.  Syntax: Class <clsname> { Variable declaration; Class Name Animal Data members/ properties/ Attributes Name, Number of legs, Colour Behaviours/ Methods Eat(), Walk(), Sleep() Methods definition; };
  • 12. Sample Program class Test { public static void main(String[] args) { System.out.println(“Hello World”); } } Execution: > javac Test.java > java Test
  • 13. Execution of java program  The java program execution can be seen through the following figure. Test.java Test.class JVM Java Program Source code Byte code JVM converts byte code to m/c code Console Program Output
  • 14. Important Interview Questions  What is the most widely used protocol on internet  What is the difference between an executable file and .class file?  Why java is suitable for internet?  Why pointers are eliminated in java?  What is the difference between a function and a method?  Which part of the JVM will allocate the memory for java program?  Which algorithm is used by garbage collector to remove the unused variables or objects from memory?
  • 15. Assignments  Check the hello world program by removing each and every word.  Shuffle the order of public static void main  Try experimenting with print & println.  Try giving different names for args.  Try giving int args[] instead of String args[] in main.  Give Different name for the filename and the class name  Repeat the above problem with declaring class as public  Copy the class file into different folder name and execute it.  Write your own program, compile it and execute it.  Try giving different data types ( the one you know like int x, double d ) in the prinltn and see if it prints all of them.  I have two Integers int x =1; and int x=2; I wish to print 12. find the ways to print.  Repeat the same if I want to print given int x=1; double d=2.5; and print 12 instead of 12.5
  • 17. Sujit Majety +91 9000019878 mail to : sujit.naga@gmail.com