SlideShare a Scribd company logo
1 of 20
Download to read offline
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Affiliated to Institution of G.G.S.IP.U, Delhi
BCA
Java Programming
20206
Ms. Bharti Dewani
Assistant Professor
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
What is Java?
A simple, object oriented, distributed, interpreted,
robust, secure, architecture neutral, portable, high
performance, multithreaded, dynamic language.
From: Java: An Overview
James Gosling, Sun Microsystems,
February 1995.
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Why Java?
• Java is a general-purpose, high-level programming
language.
• It’s almost entirely object-oriented
• It has a vast library of predefined objects and
operations called The Java Application Programming
Interface OR JAVA API
• It’s more platform independent
– this makes it great for Web programming
• It’s more secure
• It’s a software-only platform running on top of other,
hardware-based platforms.
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Features of Java
• Simple
• Architecture-neutral
• Object-Oriented
• Distributed
• Compiled
• Interpreted
• Write once, run anywhere
• Statically Typed
• Multi-Threaded
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Features of Java (Contd.)
• Portable
• High-Performance
• Robust
• Secure
• Extensible
• Well-Understood
• Garbage Collected
That’s why they say …
“ Java has changed programmer’s life . ”
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Java Applications and Java … lets
• Stand-alone Applications
– Just like any programming language
• Applet
– Run under a Java-Enabled Browser
• Midlet
– Run in a Java-Enabled Mobile Phone
• Servlet
– Run on a Java-Enabled Web Server
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Java Developer's Kit
• Java's programming environment
– Core Java API
– compiler
– interpreter
– debugger
– dis-assembler
– profiler
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Java Developer's Kit (Contd.)
Java source(.java)--java compiler-->java bytecode(.class)
Java bytecode(.class)--java dis-assembler-->java source
Java bytecode--java interpreter-->machine code (O/P)
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Java API
• Collection of ready-made i.e pre-defined software
components that provide many useful capabilities.
• Grouped into libraries , packages of related
components i.e collection of inter-related or similar
classes and interfaces
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Core API
– Essentials: Object, String, Input and Output...
– Applets
– Networking
– Internationalization
– Security
– Software Components
– Object Serialization
– Java Database Connectivity (JDBC)
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Building Standalone JAVA Programs
(on UNIX)
The “Hello World” application
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Create a Java Source File
• Pepare the file HelloWorld.java using an editor
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
} }
• Since Java is object-oriented, programs are organized into
modules called classes, which may have data in variables and
subroutines called methods.
• Note that String is built-in and
• println is a member function for the System.out class
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Compile and Run
• Compile
– javac HelloWorld.java
• A file named HelloWorld.class is created if the
compilation succeeds.
• Run
– java HelloWorld
Output:- Hello World!
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Comparing Java with C , C++
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Java and C++
Comments are almost like C++
• /* This kind of comment can span multiple lines
*/
• // This kind is to the end of the line
• /**
* This kind of comment is a special
* ‘javadoc’ style comment
*/
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Java and C
Primitive data types are like C
• Main data types are int, double, boolean, char
• Also have byte, short, long, float
• boolean has values true and false
• Declarations look like C, for example,
– double x, y;
– int count = 0;
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Java and C
Control statements are like C
• if (x < y) smaller = x;
• if (x < y){ smaller=x;sum += x;}
else { smaller = y; sum += y; }
• while (x < y) { y = y - x; }
• do { y = y - x; } while (x < y)
• for (int i = 0; i < max; i++) sum += i;
• BUT: conditions must be boolean !
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Java Vs. C
• C is procedural whereas Java is object oriented.
• In C, almost everything is in functions
• In Java, almost everything is in classes
• There must be only one public class per file
• The file name must be the same as the name of that
public class, but with a .java extension
• In Java, there is nothing called Pointers
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Java Vs. C++
• In Java,no preprocessor directives required
• In Java, header files are not included but Predefined
classes and interfaces can be imported to achieve
Reusability.
• Destructor() method is replaced by finalize() method
• Only two contructors viz. default and parameterised
are allowed in java
• Multiple inheritence is achieved via a new concept
called interface
TRINITY INSTITUTE OF PROFESSIONAL STUDIES
Sector – 9, Dwarka Institutional Area, New Delhi-75
Thank you..

More Related Content

What's hot

Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming Saravanakumar R
 
02 introductionto java
02 introductionto java02 introductionto java
02 introductionto javaAPU
 
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...Sagar Verma
 
Java introduction
Java introductionJava introduction
Java introductionSagar Verma
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaEdureka!
 
Core java lessons
Core java lessonsCore java lessons
Core java lessonsvivek shah
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java LanguagePawanMM
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javajayc8586
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programmingbusiness Corporate
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)Sujit Majety
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java Ravi_Kant_Sahu
 
Java basic-tutorial for beginners
Java basic-tutorial for beginners Java basic-tutorial for beginners
Java basic-tutorial for beginners Muzammil Ali
 
JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)Prof. Erwin Globio
 
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Edureka!
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSteve Fort
 

What's hot (20)

Introduction To Java.
Introduction To Java.Introduction To Java.
Introduction To Java.
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
 
02 introductionto java
02 introductionto java02 introductionto java
02 introductionto java
 
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
 
Java introduction
Java introductionJava introduction
Java introduction
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Core java lessons
Core java lessonsCore java lessons
Core java lessons
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java Language
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java Tutorial to Learn Java Programming
Java Tutorial to Learn Java ProgrammingJava Tutorial to Learn Java Programming
Java Tutorial to Learn Java Programming
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Genesis and Overview of Java
Genesis and Overview of Java Genesis and Overview of Java
Genesis and Overview of Java
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Java basic-tutorial for beginners
Java basic-tutorial for beginners Java basic-tutorial for beginners
Java basic-tutorial for beginners
 
JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)
 
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
 
Design pattern
Design patternDesign pattern
Design pattern
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 

Similar to Java programming

JAVA PROGRAMMING- OOP Concept
JAVA PROGRAMMING- OOP ConceptJAVA PROGRAMMING- OOP Concept
JAVA PROGRAMMING- OOP ConceptTrinity Dwarka
 
Java Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet ProgramsJava Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet ProgramsTrinity Dwarka
 
FEDT VB NET- Creating VB .Net Project
FEDT  VB  NET- Creating VB .Net Project FEDT  VB  NET- Creating VB .Net Project
FEDT VB NET- Creating VB .Net Project Trinity Dwarka
 
Introduction to programming language using c
Introduction to programming language using cIntroduction to programming language using c
Introduction to programming language using cTrinity Dwarka
 
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUCDevelopment of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUCInfinIT - Innovationsnetværket for it
 
Introduction to Information Technology- Operating system
Introduction to Information Technology- Operating systemIntroduction to Information Technology- Operating system
Introduction to Information Technology- Operating systemTrinity Dwarka
 
Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)smumbahelp
 
Introduction to Operating Systems
Introduction to Operating SystemsIntroduction to Operating Systems
Introduction to Operating SystemsTrinity Dwarka
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptxmadan r
 
INTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEMINTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEMTrinity Dwarka
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming ConceptsTrinity Dwarka
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java ProgrammingRavi Kant Sahu
 
Introduction to java programming
Introduction to java programmingIntroduction to java programming
Introduction to java programmingASIT Education
 

Similar to Java programming (20)

JAVA PROGRAMMING- OOP Concept
JAVA PROGRAMMING- OOP ConceptJAVA PROGRAMMING- OOP Concept
JAVA PROGRAMMING- OOP Concept
 
Java Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet ProgramsJava Programming- Introduction to Java Applet Programs
Java Programming- Introduction to Java Applet Programs
 
FEDT VB NET- Creating VB .Net Project
FEDT  VB  NET- Creating VB .Net Project FEDT  VB  NET- Creating VB .Net Project
FEDT VB NET- Creating VB .Net Project
 
2. Basics of Java
2. Basics of Java2. Basics of Java
2. Basics of Java
 
Introduction to programming language using c
Introduction to programming language using cIntroduction to programming language using c
Introduction to programming language using c
 
oop unit1.pptx
oop unit1.pptxoop unit1.pptx
oop unit1.pptx
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUCDevelopment of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
Development of Java tools using SWT and WALA af Hans Søndergaard, ViaUC
 
Introduction to Information Technology- Operating system
Introduction to Information Technology- Operating systemIntroduction to Information Technology- Operating system
Introduction to Information Technology- Operating system
 
Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)Mcs 024 assignment solution (2020-21)
Mcs 024 assignment solution (2020-21)
 
L1 basics
L1 basicsL1 basics
L1 basics
 
Introduction to Operating Systems
Introduction to Operating SystemsIntroduction to Operating Systems
Introduction to Operating Systems
 
Java_notes.ppt
Java_notes.pptJava_notes.ppt
Java_notes.ppt
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptx
 
INTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEMINTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEM
 
Introduction to oops
Introduction to oopsIntroduction to oops
Introduction to oops
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
L1 basics
L1 basicsL1 basics
L1 basics
 
Introduction to java programming
Introduction to java programmingIntroduction to java programming
Introduction to java programming
 

More from Trinity Dwarka

Why BAJMC in Trinity Dwarka
Why BAJMC in Trinity DwarkaWhy BAJMC in Trinity Dwarka
Why BAJMC in Trinity DwarkaTrinity Dwarka
 
Career Options after BCA
Career Options after BCACareer Options after BCA
Career Options after BCATrinity Dwarka
 
Principles of Management-Management-Concept & Meaning
  Principles of Management-Management-Concept & Meaning  Principles of Management-Management-Concept & Meaning
Principles of Management-Management-Concept & MeaningTrinity Dwarka
 
Principles of Management- Management Process & Functions
Principles of Management- Management Process  &  FunctionsPrinciples of Management- Management Process  &  Functions
Principles of Management- Management Process & FunctionsTrinity Dwarka
 
Principles of Management- Managerial Levels & Roles-
Principles of Management- Managerial Levels & Roles-Principles of Management- Managerial Levels & Roles-
Principles of Management- Managerial Levels & Roles-Trinity Dwarka
 
Management-Concept & Meaning
 Management-Concept & Meaning Management-Concept & Meaning
Management-Concept & MeaningTrinity Dwarka
 
Principles of Management- Planning
Principles of Management- PlanningPrinciples of Management- Planning
Principles of Management- PlanningTrinity Dwarka
 
Organizing Authority & Responsibility- Principles of Management
Organizing Authority & Responsibility- Principles of ManagementOrganizing Authority & Responsibility- Principles of Management
Organizing Authority & Responsibility- Principles of ManagementTrinity Dwarka
 
Staffing- Principles of Management
Staffing- Principles of ManagementStaffing- Principles of Management
Staffing- Principles of ManagementTrinity Dwarka
 
Directing-Principles of Management
Directing-Principles of ManagementDirecting-Principles of Management
Directing-Principles of ManagementTrinity Dwarka
 
Dimensional Modelling-Data Warehouse & Data Mining
 Dimensional Modelling-Data Warehouse & Data Mining Dimensional Modelling-Data Warehouse & Data Mining
Dimensional Modelling-Data Warehouse & Data MiningTrinity Dwarka
 
Data Preprocessing- Data Warehouse & Data Mining
Data Preprocessing- Data Warehouse & Data MiningData Preprocessing- Data Warehouse & Data Mining
Data Preprocessing- Data Warehouse & Data MiningTrinity Dwarka
 
Computer Networks- Network Basics
Computer Networks- Network BasicsComputer Networks- Network Basics
Computer Networks- Network BasicsTrinity Dwarka
 
Linux Environment- Linux vs Unix
Linux Environment- Linux vs UnixLinux Environment- Linux vs Unix
Linux Environment- Linux vs UnixTrinity Dwarka
 
Linux Environment- Linux Basics
Linux Environment- Linux BasicsLinux Environment- Linux Basics
Linux Environment- Linux BasicsTrinity Dwarka
 
BCA-Mobile Computing- BASICS OF MOBILE COMPUTING
BCA-Mobile Computing- BASICS OF MOBILE COMPUTINGBCA-Mobile Computing- BASICS OF MOBILE COMPUTING
BCA-Mobile Computing- BASICS OF MOBILE COMPUTINGTrinity Dwarka
 
INTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
INTRODUCTION TO INFORMATION TECHNOLOGY- IT BasicsINTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
INTRODUCTION TO INFORMATION TECHNOLOGY- IT BasicsTrinity Dwarka
 
Database Management System
Database Management System Database Management System
Database Management System Trinity Dwarka
 
E-Commerce- Introduction to E-Commerce
E-Commerce- Introduction to E-CommerceE-Commerce- Introduction to E-Commerce
E-Commerce- Introduction to E-CommerceTrinity Dwarka
 
DIGITAL ELECTRONICS- Minimization Technique Karnaugh Map
DIGITAL ELECTRONICS- Minimization TechniqueKarnaugh MapDIGITAL ELECTRONICS- Minimization TechniqueKarnaugh Map
DIGITAL ELECTRONICS- Minimization Technique Karnaugh Map Trinity Dwarka
 

More from Trinity Dwarka (20)

Why BAJMC in Trinity Dwarka
Why BAJMC in Trinity DwarkaWhy BAJMC in Trinity Dwarka
Why BAJMC in Trinity Dwarka
 
Career Options after BCA
Career Options after BCACareer Options after BCA
Career Options after BCA
 
Principles of Management-Management-Concept & Meaning
  Principles of Management-Management-Concept & Meaning  Principles of Management-Management-Concept & Meaning
Principles of Management-Management-Concept & Meaning
 
Principles of Management- Management Process & Functions
Principles of Management- Management Process  &  FunctionsPrinciples of Management- Management Process  &  Functions
Principles of Management- Management Process & Functions
 
Principles of Management- Managerial Levels & Roles-
Principles of Management- Managerial Levels & Roles-Principles of Management- Managerial Levels & Roles-
Principles of Management- Managerial Levels & Roles-
 
Management-Concept & Meaning
 Management-Concept & Meaning Management-Concept & Meaning
Management-Concept & Meaning
 
Principles of Management- Planning
Principles of Management- PlanningPrinciples of Management- Planning
Principles of Management- Planning
 
Organizing Authority & Responsibility- Principles of Management
Organizing Authority & Responsibility- Principles of ManagementOrganizing Authority & Responsibility- Principles of Management
Organizing Authority & Responsibility- Principles of Management
 
Staffing- Principles of Management
Staffing- Principles of ManagementStaffing- Principles of Management
Staffing- Principles of Management
 
Directing-Principles of Management
Directing-Principles of ManagementDirecting-Principles of Management
Directing-Principles of Management
 
Dimensional Modelling-Data Warehouse & Data Mining
 Dimensional Modelling-Data Warehouse & Data Mining Dimensional Modelling-Data Warehouse & Data Mining
Dimensional Modelling-Data Warehouse & Data Mining
 
Data Preprocessing- Data Warehouse & Data Mining
Data Preprocessing- Data Warehouse & Data MiningData Preprocessing- Data Warehouse & Data Mining
Data Preprocessing- Data Warehouse & Data Mining
 
Computer Networks- Network Basics
Computer Networks- Network BasicsComputer Networks- Network Basics
Computer Networks- Network Basics
 
Linux Environment- Linux vs Unix
Linux Environment- Linux vs UnixLinux Environment- Linux vs Unix
Linux Environment- Linux vs Unix
 
Linux Environment- Linux Basics
Linux Environment- Linux BasicsLinux Environment- Linux Basics
Linux Environment- Linux Basics
 
BCA-Mobile Computing- BASICS OF MOBILE COMPUTING
BCA-Mobile Computing- BASICS OF MOBILE COMPUTINGBCA-Mobile Computing- BASICS OF MOBILE COMPUTING
BCA-Mobile Computing- BASICS OF MOBILE COMPUTING
 
INTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
INTRODUCTION TO INFORMATION TECHNOLOGY- IT BasicsINTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
INTRODUCTION TO INFORMATION TECHNOLOGY- IT Basics
 
Database Management System
Database Management System Database Management System
Database Management System
 
E-Commerce- Introduction to E-Commerce
E-Commerce- Introduction to E-CommerceE-Commerce- Introduction to E-Commerce
E-Commerce- Introduction to E-Commerce
 
DIGITAL ELECTRONICS- Minimization Technique Karnaugh Map
DIGITAL ELECTRONICS- Minimization TechniqueKarnaugh MapDIGITAL ELECTRONICS- Minimization TechniqueKarnaugh Map
DIGITAL ELECTRONICS- Minimization Technique Karnaugh Map
 

Recently uploaded

FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewingbigorange77
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 

Recently uploaded (20)

Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewing
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Call Girls Service Dwarka @9999965857 Delhi 🫦 No Advance VVIP 🍎 SERVICE
Call Girls Service Dwarka @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SERVICECall Girls Service Dwarka @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SERVICE
Call Girls Service Dwarka @9999965857 Delhi 🫦 No Advance VVIP 🍎 SERVICE
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 

Java programming

  • 1. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Affiliated to Institution of G.G.S.IP.U, Delhi BCA Java Programming 20206 Ms. Bharti Dewani Assistant Professor
  • 2. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 What is Java? A simple, object oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high performance, multithreaded, dynamic language. From: Java: An Overview James Gosling, Sun Microsystems, February 1995.
  • 3. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Why Java? • Java is a general-purpose, high-level programming language. • It’s almost entirely object-oriented • It has a vast library of predefined objects and operations called The Java Application Programming Interface OR JAVA API • It’s more platform independent – this makes it great for Web programming • It’s more secure • It’s a software-only platform running on top of other, hardware-based platforms.
  • 4. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Features of Java • Simple • Architecture-neutral • Object-Oriented • Distributed • Compiled • Interpreted • Write once, run anywhere • Statically Typed • Multi-Threaded
  • 5. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Features of Java (Contd.) • Portable • High-Performance • Robust • Secure • Extensible • Well-Understood • Garbage Collected That’s why they say … “ Java has changed programmer’s life . ”
  • 6. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Java Applications and Java … lets • Stand-alone Applications – Just like any programming language • Applet – Run under a Java-Enabled Browser • Midlet – Run in a Java-Enabled Mobile Phone • Servlet – Run on a Java-Enabled Web Server
  • 7. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Java Developer's Kit • Java's programming environment – Core Java API – compiler – interpreter – debugger – dis-assembler – profiler
  • 8. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Java Developer's Kit (Contd.) Java source(.java)--java compiler-->java bytecode(.class) Java bytecode(.class)--java dis-assembler-->java source Java bytecode--java interpreter-->machine code (O/P)
  • 9. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Java API • Collection of ready-made i.e pre-defined software components that provide many useful capabilities. • Grouped into libraries , packages of related components i.e collection of inter-related or similar classes and interfaces
  • 10. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Core API – Essentials: Object, String, Input and Output... – Applets – Networking – Internationalization – Security – Software Components – Object Serialization – Java Database Connectivity (JDBC)
  • 11. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Building Standalone JAVA Programs (on UNIX) The “Hello World” application
  • 12. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Create a Java Source File • Pepare the file HelloWorld.java using an editor public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } • Since Java is object-oriented, programs are organized into modules called classes, which may have data in variables and subroutines called methods. • Note that String is built-in and • println is a member function for the System.out class
  • 13. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Compile and Run • Compile – javac HelloWorld.java • A file named HelloWorld.class is created if the compilation succeeds. • Run – java HelloWorld Output:- Hello World!
  • 14. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Comparing Java with C , C++
  • 15. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Java and C++ Comments are almost like C++ • /* This kind of comment can span multiple lines */ • // This kind is to the end of the line • /** * This kind of comment is a special * ‘javadoc’ style comment */
  • 16. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Java and C Primitive data types are like C • Main data types are int, double, boolean, char • Also have byte, short, long, float • boolean has values true and false • Declarations look like C, for example, – double x, y; – int count = 0;
  • 17. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Java and C Control statements are like C • if (x < y) smaller = x; • if (x < y){ smaller=x;sum += x;} else { smaller = y; sum += y; } • while (x < y) { y = y - x; } • do { y = y - x; } while (x < y) • for (int i = 0; i < max; i++) sum += i; • BUT: conditions must be boolean !
  • 18. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Java Vs. C • C is procedural whereas Java is object oriented. • In C, almost everything is in functions • In Java, almost everything is in classes • There must be only one public class per file • The file name must be the same as the name of that public class, but with a .java extension • In Java, there is nothing called Pointers
  • 19. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Java Vs. C++ • In Java,no preprocessor directives required • In Java, header files are not included but Predefined classes and interfaces can be imported to achieve Reusability. • Destructor() method is replaced by finalize() method • Only two contructors viz. default and parameterised are allowed in java • Multiple inheritence is achieved via a new concept called interface
  • 20. TRINITY INSTITUTE OF PROFESSIONAL STUDIES Sector – 9, Dwarka Institutional Area, New Delhi-75 Thank you..