Enviar pesquisa
Carregar
Java programming basics
•
0 gostou
•
469 visualizações
Pragya Rastogi
Seguir
Tecnologia
Notícias e política
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 24
Baixar agora
Baixar para ler offline
Recomendados
Experience in Corporate Training in Virtual Worlds
Experience in Corporate Training in Virtual Worlds
Agile Dimensions LLC
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
AIP Foundation
Make Your Builds More Groovy
Make Your Builds More Groovy
Paul King
Dollars and Dates are Killing Agile
Dollars and Dates are Killing Agile
Chris Sterling
Tech Ed09 India Ver M New
Tech Ed09 India Ver M New
rsnarayanan
Programr Brief Overview
Programr Brief Overview
_programr
Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)
François Le Droff
Oop01 6
Oop01 6
schwaa
Recomendados
Experience in Corporate Training in Virtual Worlds
Experience in Corporate Training in Virtual Worlds
Agile Dimensions LLC
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
IBM Mobile Foundation POT - Part 2 introduction to application development wi...
AIP Foundation
Make Your Builds More Groovy
Make Your Builds More Groovy
Paul King
Dollars and Dates are Killing Agile
Dollars and Dates are Killing Agile
Chris Sterling
Tech Ed09 India Ver M New
Tech Ed09 India Ver M New
rsnarayanan
Programr Brief Overview
Programr Brief Overview
_programr
Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)
François Le Droff
Oop01 6
Oop01 6
schwaa
UnBBayes Plugin Framework
UnBBayes Plugin Framework
Rommel Carvalho
Vsx5 getting started_guide_en
Vsx5 getting started_guide_en
Geraldo Camargo
Sv jug - mar 2013 - sl
Sv jug - mar 2013 - sl
CloudBees
Squeeze more juice from jenkins
Squeeze more juice from jenkins
CloudBees
PowerPoint Presentation
PowerPoint Presentation
rhofkens
Subversion Edge Overview
Subversion Edge Overview
LotharSchubert
Quality Best Practices & Toolkit for Enterprise Flex
Quality Best Practices & Toolkit for Enterprise Flex
François Le Droff
Alliance Successful Selenium Automation
Alliance Successful Selenium Automation
sadams22
AD114 - Don't be afraid of curly brackets reloaded - even more JavaScript for...
AD114 - Don't be afraid of curly brackets reloaded - even more JavaScript for...
Stephan H. Wissel
Gl qtp day 3 2
Gl qtp day 3 2
Pragya Rastogi
Social guide to_link_building
Social guide to_link_building
Consultora de Marketing Digital
Gl qtp day 1 & 2
Gl qtp day 1 & 2
Pragya Rastogi
How to-segment-integrate-your-emails-fin
How to-segment-integrate-your-emails-fin
Consultora de Marketing Digital
70562-Dumps
70562-Dumps
Pragya Rastogi
A1
A1
retrogal
Index Grey (1)
Index Grey (1)
ectprinting
32916
32916
Pragya Rastogi
70 433
70 433
Pragya Rastogi
18 octubre2007 borinbizkarra
18 octubre2007 borinbizkarra
HUGO ARAUJO
120 marketing-stats-charts-and-graphs
120 marketing-stats-charts-and-graphs
Consultora de Marketing Digital
After midsem-slides-1224252673846877-9 nirav
After midsem-slides-1224252673846877-9 nirav
niravjingar
Qtp tutorial
Qtp tutorial
Pragya Rastogi
Mais conteúdo relacionado
Mais procurados
UnBBayes Plugin Framework
UnBBayes Plugin Framework
Rommel Carvalho
Vsx5 getting started_guide_en
Vsx5 getting started_guide_en
Geraldo Camargo
Sv jug - mar 2013 - sl
Sv jug - mar 2013 - sl
CloudBees
Squeeze more juice from jenkins
Squeeze more juice from jenkins
CloudBees
PowerPoint Presentation
PowerPoint Presentation
rhofkens
Subversion Edge Overview
Subversion Edge Overview
LotharSchubert
Quality Best Practices & Toolkit for Enterprise Flex
Quality Best Practices & Toolkit for Enterprise Flex
François Le Droff
Alliance Successful Selenium Automation
Alliance Successful Selenium Automation
sadams22
AD114 - Don't be afraid of curly brackets reloaded - even more JavaScript for...
AD114 - Don't be afraid of curly brackets reloaded - even more JavaScript for...
Stephan H. Wissel
Mais procurados
(9)
UnBBayes Plugin Framework
UnBBayes Plugin Framework
Vsx5 getting started_guide_en
Vsx5 getting started_guide_en
Sv jug - mar 2013 - sl
Sv jug - mar 2013 - sl
Squeeze more juice from jenkins
Squeeze more juice from jenkins
PowerPoint Presentation
PowerPoint Presentation
Subversion Edge Overview
Subversion Edge Overview
Quality Best Practices & Toolkit for Enterprise Flex
Quality Best Practices & Toolkit for Enterprise Flex
Alliance Successful Selenium Automation
Alliance Successful Selenium Automation
AD114 - Don't be afraid of curly brackets reloaded - even more JavaScript for...
AD114 - Don't be afraid of curly brackets reloaded - even more JavaScript for...
Destaque
Gl qtp day 3 2
Gl qtp day 3 2
Pragya Rastogi
Social guide to_link_building
Social guide to_link_building
Consultora de Marketing Digital
Gl qtp day 1 & 2
Gl qtp day 1 & 2
Pragya Rastogi
How to-segment-integrate-your-emails-fin
How to-segment-integrate-your-emails-fin
Consultora de Marketing Digital
70562-Dumps
70562-Dumps
Pragya Rastogi
A1
A1
retrogal
Index Grey (1)
Index Grey (1)
ectprinting
32916
32916
Pragya Rastogi
70 433
70 433
Pragya Rastogi
18 octubre2007 borinbizkarra
18 octubre2007 borinbizkarra
HUGO ARAUJO
120 marketing-stats-charts-and-graphs
120 marketing-stats-charts-and-graphs
Consultora de Marketing Digital
After midsem-slides-1224252673846877-9 nirav
After midsem-slides-1224252673846877-9 nirav
niravjingar
Qtp tutorial
Qtp tutorial
Pragya Rastogi
Qtp not just for gui anymore
Qtp not just for gui anymore
Pragya Rastogi
I.m.p
I.m.p
niravjingar
GL_Web application testing using selenium
GL_Web application testing using selenium
Pragya Rastogi
1
1
niravjingar
Destaque
(17)
Gl qtp day 3 2
Gl qtp day 3 2
Social guide to_link_building
Social guide to_link_building
Gl qtp day 1 & 2
Gl qtp day 1 & 2
How to-segment-integrate-your-emails-fin
How to-segment-integrate-your-emails-fin
70562-Dumps
70562-Dumps
A1
A1
Index Grey (1)
Index Grey (1)
32916
32916
70 433
70 433
18 octubre2007 borinbizkarra
18 octubre2007 borinbizkarra
120 marketing-stats-charts-and-graphs
120 marketing-stats-charts-and-graphs
After midsem-slides-1224252673846877-9 nirav
After midsem-slides-1224252673846877-9 nirav
Qtp tutorial
Qtp tutorial
Qtp not just for gui anymore
Qtp not just for gui anymore
I.m.p
I.m.p
GL_Web application testing using selenium
GL_Web application testing using selenium
1
1
Semelhante a Java programming basics
Introduction to Java Programming
Introduction to Java Programming
Ravi Kant Sahu
L1 basics
L1 basics
teach4uin
Introduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeople
SpringPeople
Introduction to Java
Introduction to Java
Soumya Suman
Java training in bangalore
Java training in bangalore
zasi besant
130700548484460000
130700548484460000
Tanzeel Ahmad
java Training in Ranchi
java Training in Ranchi
sanjaydeo12
Oops
Oops
Pragya Rastogi
Java (1)
Java (1)
Samraiz Tejani
Introduction to java
Introduction to java
Krunali Gandhi
XebiaLabs Overview Slides
XebiaLabs Overview Slides
XebiaLabs
MODULE_1_The History and Evolution of Java.pptx
MODULE_1_The History and Evolution of Java.pptx
VeerannaKotagi1
Gl istqb testing fundamentals
Gl istqb testing fundamentals
Pragya Rastogi
X pages jumpstart jmp101
X pages jumpstart jmp101
pdhannan
Java Intro
Java Intro
Nazmul Hasan Rupok
Java Basic.pdf
Java Basic.pdf
TechSearchWeb
Vb.net basics 1(vb,net--3 year)
Vb.net basics 1(vb,net--3 year)
Ankit Gupta
Introduction to Spring & Spring BootFramework
Introduction to Spring & Spring BootFramework
Kongu Engineering College, Perundurai, Erode
JAVA object oriented programming (oop).ppt
JAVA object oriented programming (oop).ppt
AliyaJav
Fundamentals of JAVA
Fundamentals of JAVA
KUNAL GADHIA
Semelhante a Java programming basics
(20)
Introduction to Java Programming
Introduction to Java Programming
L1 basics
L1 basics
Introduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeople
Introduction to Java
Introduction to Java
Java training in bangalore
Java training in bangalore
130700548484460000
130700548484460000
java Training in Ranchi
java Training in Ranchi
Oops
Oops
Java (1)
Java (1)
Introduction to java
Introduction to java
XebiaLabs Overview Slides
XebiaLabs Overview Slides
MODULE_1_The History and Evolution of Java.pptx
MODULE_1_The History and Evolution of Java.pptx
Gl istqb testing fundamentals
Gl istqb testing fundamentals
X pages jumpstart jmp101
X pages jumpstart jmp101
Java Intro
Java Intro
Java Basic.pdf
Java Basic.pdf
Vb.net basics 1(vb,net--3 year)
Vb.net basics 1(vb,net--3 year)
Introduction to Spring & Spring BootFramework
Introduction to Spring & Spring BootFramework
JAVA object oriented programming (oop).ppt
JAVA object oriented programming (oop).ppt
Fundamentals of JAVA
Fundamentals of JAVA
Mais de Pragya Rastogi
Gl android platform
Gl android platform
Pragya Rastogi
Qtp questions
Qtp questions
Pragya Rastogi
Qtp4 bpt
Qtp4 bpt
Pragya Rastogi
Get ro property outputting value
Get ro property outputting value
Pragya Rastogi
Bp ttutorial
Bp ttutorial
Pragya Rastogi
Gl scrum testing_models
Gl scrum testing_models
Pragya Rastogi
My Sql concepts
My Sql concepts
Pragya Rastogi
70433 Dumps DB
70433 Dumps DB
Pragya Rastogi
70562 (1)
70562 (1)
Pragya Rastogi
70 562
70 562
Pragya Rastogi
Mobile testingartifacts
Mobile testingartifacts
Pragya Rastogi
Gl qtp day 3 1
Gl qtp day 3 1
Pragya Rastogi
Mais de Pragya Rastogi
(12)
Gl android platform
Gl android platform
Qtp questions
Qtp questions
Qtp4 bpt
Qtp4 bpt
Get ro property outputting value
Get ro property outputting value
Bp ttutorial
Bp ttutorial
Gl scrum testing_models
Gl scrum testing_models
My Sql concepts
My Sql concepts
70433 Dumps DB
70433 Dumps DB
70562 (1)
70562 (1)
70 562
70 562
Mobile testingartifacts
Mobile testingartifacts
Gl qtp day 3 1
Gl qtp day 3 1
Último
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
The Digital Insurer
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Boston Institute of Analytics
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
hans926745
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
Último
(20)
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Java programming basics
1.
Connect. Collaborate. Innovate.
Java Programming Basic Concepts Learning Facilitator: Date: © Copyright GlobalLogic 2009 1
2.
Connect. Collaborate. Innovate.
Gentle Reminder: “Switch Off” your Mobile Phone Or Switch Mobile Phone to “Silent Mode” © Copyright GlobalLogic 2009 2
3.
Connect. Collaborate. Innovate.
Agenda • What JAVA is for? – Software Portability – Why Portability Matters – Language and Libraries • Basic Concepts – JVM, Classpath – Packages – Data Types – JavaDoc/Comments – Garbage Collection • Example Java Application © Copyright GlobalLogic 2009 3 3
4.
Connect. Collaborate. Innovate.
What JAVA does for you? • Hardware Systems – Processor + memory + I/O devices (Platform to execute softwares) • Operating Systems – An operating system (OS) is a set of computer programs that manage the hardware and software resources of a computer. – Runs on top of hardware, so tightly attached with the hardware • Application Softwares – Runs on top of operating system, a subclass of computer software which address a particular objective e.g. Word-processors .. – Application made for one OS/hardware system may not run on another. © Copyright GlobalLogic 2009 4 4
5.
Connect. Collaborate. Innovate.
Why Portability? • Softwares Portability “Applications that are independent of all hardware and operating systems” You can compile a Java program on any system and run the resulting binary executable file on the same or any other system • “Software portability” refers to adapting a software to a new environment, without re-developing it. This reduces the re- development efforts. © Copyright GlobalLogic 2009 5 5
6.
Connect. Collaborate. Innovate.
Why Portability? • There are different hardware and operating systems • Even for one OS, there are numerous releases • Software portability is all about “Future-proofing” your Software investment “Future proofing” is a process of trying to anticipate future developments, so that appropriate actions can be taken to minimize negative consequences. • With application programs written in Java, you can change/upgrade OS and applications independently © Copyright GlobalLogic 2009 6 6
7.
Connect. Collaborate. Innovate.
• Example C program void main() { int arr[2]; printf(“%dn”, arr*3+); } • Run this on windows (using turbo c) • Run this on Unix (using gcc) • Compare the results © Copyright GlobalLogic 2009 7 7
8.
Connect. Collaborate. Innovate.
Language & Libraries • A “programming language” is about – Describing DATA – Describing STATEMENTS that work on DATA – Describing the ways the two can be put together • How expressions are formed • What statements look like • Java is a Object-oriented, strongly typed language. – Strongly typed languages specify one or more restrictions on how operations involving values having different data types can be intermixed. • Library (package) – Frequently reused code – Not an executable program, but contains executable code – Linking with program's address space © Copyright GlobalLogic 2009 8 8
9.
Connect. Collaborate. Innovate.
JVM • A virtual machine (VM) is an abstract computer architecture • Software on top of a real hardware • Can run the same application on different machines where the VM is available Java program C program v1 C program v2 Compiler C compiler and executor 1 JVM 1 JVM 2 JVM 3 C compiler and executor 2 Platform 1 Platform 2 Platform 3 © Copyright GlobalLogic 2009 9 9
10.
Connect. Collaborate. Innovate.
• Java source code is compiled to byte-codes whose target architecture is the Java Virtual Machine (JVM) • Just-in-time (JIT) compiler provides compilation of byte-code to machine code © Copyright GlobalLogic 2009 10 10
11.
Connect. Collaborate. Innovate. ©
Copyright GlobalLogic 2009 11 11
12.
Connect. Collaborate. Innovate.
Exercise • Write a Java program to print “Hello World!!!” on the command prompt (Use notepad) – Compile the program – Run the program © Copyright GlobalLogic 2009 12 12
13.
Connect. Collaborate. Innovate.
Classpath • The Classpath is an argument (Environment variable) that tells the Java Virtual Machine where to look for user-defined classes and packages in Java programs. • Setting CLASSPATH from command-line SET CLASSPATH=Dir; • Setting CLASSPATH in Windows via Control-panel © Copyright GlobalLogic 2009 13 13
14.
Connect. Collaborate. Innovate.
Exercise • Revisit the hello world program • Compiling and running the program from any other directory © Copyright GlobalLogic 2009 14 14
15.
Connect. Collaborate. Innovate.
Java Packages • A Java package is a mechanism for organizing Java classes into namespaces. • A package provides a unique namespace for the types it contains. • Classes in the same package can access each other's protected members. • Packages are usually defined using a hierarchical naming pattern • Example – java.lang.*, com.globallogic.* © Copyright GlobalLogic 2009 15 15
16.
Connect. Collaborate. Innovate.
Exercise • Move the hello world program in a package com.globallogic.training.java • Now compile and execute the program © Copyright GlobalLogic 2009 16 16
17.
Connect. Collaborate. Innovate.
Data Types • A data type is a set of values and the operations on those values – For example, the Java "int" type is the set of 32-bit integers together with the operations "+", "*", "%", etc that operate over integers • A data type describes representation, interpretation and structure of values manipulated by algorithms or objects stored in computer memory or other storage device • Java has two groups of data types, primitive data types and object references. – primitive data types store actual data, – Java object references are variables which hold references to objects © Copyright GlobalLogic 2009 17 17
18.
Connect. Collaborate. Innovate.
Data Types • Arrays int[] anArray; anArray = new int[10]; OR int[] anArray = new int[10]; • String String greeting = "Hello world!"; character array char[] helloArray = { 'h', 'e', 'l', 'l', 'o', '.'}; String helloString = new String(helloArray); Basic operations length concat substr • int, float © Copyright GlobalLogic 2009 18 18
19.
Connect. Collaborate. Innovate.
Basic I/O • I/O streams • An I/O Stream represents an input source or an output destination. A stream can represent many different kinds of sources and destinations, including disk files, devices, other programs, and memory arrays. • Input stream • Output stream • Writing on console System.out.println(“...”); • Reading from console BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in.readLine(); © Copyright GlobalLogic 2009 19 19
20.
Connect. Collaborate. Innovate.
Exercise • To determine whether a given string is a palindrome. – Input : a String to be read from console – Ouptput: true/false © Copyright GlobalLogic 2009 20 20
21.
Connect. Collaborate. Innovate.
Garbage Collection • Garbage collection (GC) is a form of automatic memory management. • The garbage collector or collector attempts to reclaim garbage, or memory used by objects that will never be accessed the application • The basic principle of how a garbage collector works is: – Determine what data objects in a program will not be accessed in the future – Reclaim the resources used by those objects • A key feature of Java is its garbage-collected heap, which takes care of freeing dynamically allocated memory that is no longer referenced. © Copyright GlobalLogic 2009 21 21
22.
Connect. Collaborate. Innovate.
JavaDoc/Comments Java comments are of three types – Line Comment //line comment – Block Comment /* block comment */ – JavaDoc Comment /** * ... */ • Javadoc is a tool for generating API documentation in HTML format from doc comments in source code © Copyright GlobalLogic 2009 22 22
23.
Connect. Collaborate. Innovate.
Q&A © Copyright GlobalLogic 2009 23
24.
Connect. Collaborate. Innovate.
“Thank You” for your learning contribution! Please submit feedback to help L&D make continuous improvement…… Dial @ Learning: Noida: 4444, Nagpur:333, Pune:5222, Banglore:111 E mail: learning@globallogic.com © Copyright GlobalLogic 2009 24
Baixar agora