SlideShare a Scribd company logo
2.1 JAVA
2.2.1 A Programming Language
Java is a general-purpose computer programming language that is concurrent, class-
based, object-oriented,and specifically designed to have as few implementation dependencies
as possible. It is intended to let application developers "write once, run anywhere"
(WORA), meaning that compiled Java code can run on all platforms that support Java
without the need for recompilation.[14] Java applications are typically compiled
to bytecode that can run on any Java virtual machine (JVM) regardless ofcomputer
architecture. As of 2015, Java is one of the most popular programming languages in
use,particularly for client-server web applications, with a reported 9 million developers.Java
was originally developed by James Gosling at Sun Microsystems (which has since
been acquired by Oracle Corporation) and released in 1995 as a core component of Sun
Microsystems' Java platform. The language derives much of its syntax from C and C++, but it
has fewer low-level facilities than either of them.The original and reference
implementation Java compilers, virtual machines, and class libraries were originally released
by Sun under proprietary licences.Others have also developed alternative implementations of
these Sun technologies, such as the GNU Compiler for Java (bytecode compiler), GNU
Classpath (standard libraries), and IcedTea-Web (browser plugin for applets).
2.2.2 Design Goal
o Java was originally meant to be a platform-neutral language for embedded
software in devices
o The goal was to move away from platform and OS-specific compilers that
would compile source for a particular target platform to a language that would
be portable, and platform-independent
o The language could be used to produce platform-neutral code.
2.2.3 Java Architecture
Step1:
Create a java source code with .java extension
Step2:
Compile the source code using java compiler, which will create bytecode file with .class
extension
Step3:
Class loader reads both the user defined and library classes into the memory for execution.
Step4:
Bytecode verifier validates all the bytecodes are valid and do not violate Java’s security
restrictions.
Step5:
JVM reads bytecodes and translates into machine code for execution. While execution of the
program the code will interact to the operating system and hardware.
2.2.4 JDBC Tools and Components
The java.sql package contains a set of interfaces that specify the JDBC API. This package is
part of Java 1.1.7 and Java 2. Database vendors implement these interfaces in different ways,
but the JDBC API itself is standard.
Using JDBC, you can write code that:
• Connects to one or more data servers
• Executes any SQL statement
• Obtains a result set so that you can navigate through query results
• Obtains metadata from the data server
 Loading the driver or drivers you want to use is very simple and involves just one line
of code. If, for example, you want to use the JDBC-ODBC Bridge driver, the
following code will load it:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
 Your driver documentation will give you the class name to use. Class.forName will
automatically register the driver with the DriverManager.
 The java.sql.Connection object, which encapsulates a single connection to a particular
database, forms the basis of all JDBC data-handling code. The
DriverManager.getConnection( ) method creates a connection:
 Connection con = DriverManager.getConnection("url", "user", "password");
 You pass three arguments to getConnection( ): a JDBC URL, a database username,
and a password. For databases that don't require explicit logins, the user and password
strings should be left blank. When the method is called, the DriverManager queries
each registered driver, asking if it understands the URL. If a driver recognizes the
URL, it returns a Connection object. Because the getConnection( ) method checks
each driver in turn, you should avoid loading more drivers than are necessary for your
application.
Java

More Related Content

What's hot

Java programming(unit 1)
Java programming(unit 1)Java programming(unit 1)
Java programming(unit 1)
SURBHI SAROHA
 
Introduction to java technology
Introduction to java technologyIntroduction to java technology
Introduction to java technology
Indika Munaweera Kankanamge
 
History of java'
History of java'History of java'
History of java'
deepthisujithra
 
Advance java Online Training in Hyderabad
Advance java Online Training in HyderabadAdvance java Online Training in Hyderabad
Advance java Online Training in Hyderabad
Ugs8008
 
Features of java
Features of javaFeatures of java
Features of java
laratechnologies
 
J2EE Struts with Hibernate Framework
J2EE Struts with Hibernate FrameworkJ2EE Struts with Hibernate Framework
J2EE Struts with Hibernate Framework
mparth
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
Harsha Batra
 
Groovy features
Groovy featuresGroovy features
Groovy features
Ramakrishna kapa
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
Mehak Tawakley
 
Java features
Java featuresJava features
Java features
myrajendra
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
sshhzap
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
Saravanakumar R
 
Java and its features
Java and its featuresJava and its features
Java and its features
Pydi Nikhil
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
Mohit Belwal
 
Lecture 3
Lecture 3Lecture 3
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
jaimefrozr
 
Chapter 1. java programming language overview
Chapter 1. java programming language overviewChapter 1. java programming language overview
Chapter 1. java programming language overview
Jong Soon Bok
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
ph7 -
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
Sujit Majety
 
Java in Mule
Java in MuleJava in Mule
Java in Mule
Anand kalla
 

What's hot (20)

Java programming(unit 1)
Java programming(unit 1)Java programming(unit 1)
Java programming(unit 1)
 
Introduction to java technology
Introduction to java technologyIntroduction to java technology
Introduction to java technology
 
History of java'
History of java'History of java'
History of java'
 
Advance java Online Training in Hyderabad
Advance java Online Training in HyderabadAdvance java Online Training in Hyderabad
Advance java Online Training in Hyderabad
 
Features of java
Features of javaFeatures of java
Features of java
 
J2EE Struts with Hibernate Framework
J2EE Struts with Hibernate FrameworkJ2EE Struts with Hibernate Framework
J2EE Struts with Hibernate Framework
 
Java ms harsha
Java ms harshaJava ms harsha
Java ms harsha
 
Groovy features
Groovy featuresGroovy features
Groovy features
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
 
Java features
Java featuresJava features
Java features
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
 
Java and its features
Java and its featuresJava and its features
Java and its features
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Chapter 1. java programming language overview
Chapter 1. java programming language overviewChapter 1. java programming language overview
Chapter 1. java programming language overview
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Java in Mule
Java in MuleJava in Mule
Java in Mule
 

Viewers also liked

Baixa estatura linear em meninos verdadeira obsessão, falsa noção pais escolh...
Baixa estatura linear em meninos verdadeira obsessão, falsa noção pais escolh...Baixa estatura linear em meninos verdadeira obsessão, falsa noção pais escolh...
Baixa estatura linear em meninos verdadeira obsessão, falsa noção pais escolh...
Van Der Häägen Brazil
 
Script
Script Script
Tip ca naveed-ul_hassan
Tip ca naveed-ul_hassanTip ca naveed-ul_hassan
Tip ca naveed-ul_hassan
Naveed Ul Hassan
 
Día Europeo de las lenguas
Día Europeo de las lenguasDía Europeo de las lenguas
Día Europeo de las lenguas
queleescomenius
 
Manual de Autocad 14 avançado - aula 03 - Limpeza do banco de dados do fichei...
Manual de Autocad 14 avançado - aula 03 - Limpeza do banco de dados do fichei...Manual de Autocad 14 avançado - aula 03 - Limpeza do banco de dados do fichei...
Manual de Autocad 14 avançado - aula 03 - Limpeza do banco de dados do fichei...
alexandre ribeiro
 
жирафики
жирафикижирафики
жирафики
valeriya_kot
 
Risk assessment
Risk assessment Risk assessment
Risk assessment
shaunaeleacy
 
Task 2 magazines
Task 2 magazinesTask 2 magazines
Task 2 magazines
forestmad1
 
Tip ca-moeen ahmed
Tip ca-moeen ahmedTip ca-moeen ahmed
Tip ca-moeen ahmed
Moeen Memon
 
Los 4 plantásticos Logo
Los 4 plantásticos LogoLos 4 plantásticos Logo
Los 4 plantásticos Logo
paulamglez
 
Superstitions
SuperstitionsSuperstitions
Superstitions
Saiqa Jabeen
 
Plano de act 4
Plano de act 4Plano de act 4
Plano de act 4sstab
 
New GL concepts
New GL conceptsNew GL concepts
New GL concepts
puppala
 

Viewers also liked (15)

M.E. Provisional
M.E. ProvisionalM.E. Provisional
M.E. Provisional
 
Baixa estatura linear em meninos verdadeira obsessão, falsa noção pais escolh...
Baixa estatura linear em meninos verdadeira obsessão, falsa noção pais escolh...Baixa estatura linear em meninos verdadeira obsessão, falsa noção pais escolh...
Baixa estatura linear em meninos verdadeira obsessão, falsa noção pais escolh...
 
Script
Script Script
Script
 
Tip ca naveed-ul_hassan
Tip ca naveed-ul_hassanTip ca naveed-ul_hassan
Tip ca naveed-ul_hassan
 
Día Europeo de las lenguas
Día Europeo de las lenguasDía Europeo de las lenguas
Día Europeo de las lenguas
 
Manual de Autocad 14 avançado - aula 03 - Limpeza do banco de dados do fichei...
Manual de Autocad 14 avançado - aula 03 - Limpeza do banco de dados do fichei...Manual de Autocad 14 avançado - aula 03 - Limpeza do banco de dados do fichei...
Manual de Autocad 14 avançado - aula 03 - Limpeza do banco de dados do fichei...
 
жирафики
жирафикижирафики
жирафики
 
Risk assessment
Risk assessment Risk assessment
Risk assessment
 
Task 2 magazines
Task 2 magazinesTask 2 magazines
Task 2 magazines
 
Tip ca-moeen ahmed
Tip ca-moeen ahmedTip ca-moeen ahmed
Tip ca-moeen ahmed
 
Los 4 plantásticos Logo
Los 4 plantásticos LogoLos 4 plantásticos Logo
Los 4 plantásticos Logo
 
Od założeń do realizacji czyli łódzkie eZdrowie na finiszu
Od założeń do realizacji czyli łódzkie eZdrowie na finiszuOd założeń do realizacji czyli łódzkie eZdrowie na finiszu
Od założeń do realizacji czyli łódzkie eZdrowie na finiszu
 
Superstitions
SuperstitionsSuperstitions
Superstitions
 
Plano de act 4
Plano de act 4Plano de act 4
Plano de act 4
 
New GL concepts
New GL conceptsNew GL concepts
New GL concepts
 

Similar to Java

Unit1 JAVA.pptx
Unit1 JAVA.pptxUnit1 JAVA.pptx
Unit1 JAVA.pptx
RahulAnand111531
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
vikasbagra9887
 
Jdbc
JdbcJdbc
Jdbc
JdbcJdbc
Software environment
Software environmentSoftware environment
Software environment
Kinnudj Amee
 
Software requirement
Software requirementSoftware requirement
Software requirement
madhukarreddy007
 
Java Intro
Java IntroJava Intro
Java Intro
Nazmul Hasan Rupok
 
JAVA First Day
JAVA First DayJAVA First Day
JAVA First Day
Sher Singh Bardhan
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Prof. Dr. K. Adisesha
 
Core java slides
Core java slidesCore java slides
Core java slides
Abhilash Nair
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1
Qualys
 
Core Java-1 (1).pdf
Core Java-1 (1).pdfCore Java-1 (1).pdf
Core Java-1 (1).pdf
HaskellKohler1234
 
JAVA AND ANDROID OS_PRESENTATION
JAVA AND ANDROID OS_PRESENTATIONJAVA AND ANDROID OS_PRESENTATION
JAVA AND ANDROID OS_PRESENTATION
Benjamin Agboola
 
What is-java
What is-javaWhat is-java
What is-java
Shahid Rasheed
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
AdiseshaK
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
Murugesh33
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
Murugesh33
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
Java Lover
 
Java session2
Java session2Java session2
Java session2
Jigarthacker
 
Unit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdfUnit-IV_Introduction to Java.pdf

Similar to Java (20)

Unit1 JAVA.pptx
Unit1 JAVA.pptxUnit1 JAVA.pptx
Unit1 JAVA.pptx
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
 
Jdbc
JdbcJdbc
Jdbc
 
Jdbc
JdbcJdbc
Jdbc
 
Software environment
Software environmentSoftware environment
Software environment
 
Software requirement
Software requirementSoftware requirement
Software requirement
 
Java Intro
Java IntroJava Intro
Java Intro
 
JAVA First Day
JAVA First DayJAVA First Day
JAVA First Day
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Core java slides
Core java slidesCore java slides
Core java slides
 
Java Lecture 1
Java Lecture 1Java Lecture 1
Java Lecture 1
 
Core Java-1 (1).pdf
Core Java-1 (1).pdfCore Java-1 (1).pdf
Core Java-1 (1).pdf
 
JAVA AND ANDROID OS_PRESENTATION
JAVA AND ANDROID OS_PRESENTATIONJAVA AND ANDROID OS_PRESENTATION
JAVA AND ANDROID OS_PRESENTATION
 
What is-java
What is-javaWhat is-java
What is-java
 
Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Java session2
Java session2Java session2
Java session2
 
Unit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdfUnit-IV_Introduction to Java.pdf
Unit-IV_Introduction to Java.pdf
 

Recently uploaded

Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 

Recently uploaded (20)

Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 

Java

  • 1. 2.1 JAVA 2.2.1 A Programming Language Java is a general-purpose computer programming language that is concurrent, class- based, object-oriented,and specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.[14] Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless ofcomputer architecture. As of 2015, Java is one of the most popular programming languages in use,particularly for client-server web applications, with a reported 9 million developers.Java was originally developed by James Gosling at Sun Microsystems (which has since been acquired by Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them.The original and reference implementation Java compilers, virtual machines, and class libraries were originally released by Sun under proprietary licences.Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java (bytecode compiler), GNU Classpath (standard libraries), and IcedTea-Web (browser plugin for applets). 2.2.2 Design Goal o Java was originally meant to be a platform-neutral language for embedded software in devices o The goal was to move away from platform and OS-specific compilers that would compile source for a particular target platform to a language that would be portable, and platform-independent o The language could be used to produce platform-neutral code. 2.2.3 Java Architecture
  • 2. Step1: Create a java source code with .java extension Step2: Compile the source code using java compiler, which will create bytecode file with .class extension Step3: Class loader reads both the user defined and library classes into the memory for execution. Step4: Bytecode verifier validates all the bytecodes are valid and do not violate Java’s security restrictions. Step5: JVM reads bytecodes and translates into machine code for execution. While execution of the program the code will interact to the operating system and hardware. 2.2.4 JDBC Tools and Components The java.sql package contains a set of interfaces that specify the JDBC API. This package is part of Java 1.1.7 and Java 2. Database vendors implement these interfaces in different ways, but the JDBC API itself is standard. Using JDBC, you can write code that:
  • 3. • Connects to one or more data servers • Executes any SQL statement • Obtains a result set so that you can navigate through query results • Obtains metadata from the data server  Loading the driver or drivers you want to use is very simple and involves just one line of code. If, for example, you want to use the JDBC-ODBC Bridge driver, the following code will load it: Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");  Your driver documentation will give you the class name to use. Class.forName will automatically register the driver with the DriverManager.  The java.sql.Connection object, which encapsulates a single connection to a particular database, forms the basis of all JDBC data-handling code. The DriverManager.getConnection( ) method creates a connection:  Connection con = DriverManager.getConnection("url", "user", "password");  You pass three arguments to getConnection( ): a JDBC URL, a database username, and a password. For databases that don't require explicit logins, the user and password strings should be left blank. When the method is called, the DriverManager queries each registered driver, asking if it understands the URL. If a driver recognizes the URL, it returns a Connection object. Because the getConnection( ) method checks each driver in turn, you should avoid loading more drivers than are necessary for your application.