SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Objectives
On completion of this period, you would be able to
 know

•   The process of entering and execution of a Java
    program
•   White spaces, separators, literals and keywords
•   Comments in Java




                          9CM604.5                    1
Recap

•   What is a Byte Code
•   What are the OOP Concepts
•   Define Encapsulation
•   Define Inheritance
•   Define Polymorphism


                         9CM604.5   2
The Process of Entering and Executing a Java
                 Program

  Entering a Java Program
  •   We can create a program using any text editor
  •   Let us assume we have entered the following
      program




                         9CM604.5                     3
The Process of Entering and Executing a Java
                                           Contd..
                    Program
class Example
{
  public static void main(String args[])
  {
     system.out.println(“Hello World”);
   }
}



                        9CM604.5                     4
The Process of Entering and Executing a Java
                                       Contd..
                 Program

  •   We must save this program in a file called
      Example.java

  •   Ensure that the file name contains the class name

  •   This file is called the source file




                           9CM604.5                   5
The Process of Entering and Executing a Java
                                                 Contd..
                      Program

•   All Java source files will have the extension .java
•   If a program contains multiple classes, the file
    name must be the class name of the class
    containing the main method




                          9CM604.5                         6
Executing a Java Program

Executing a Java Program involves two steps

1) Compiling a Java program

2) Running a Java program




                       9CM604.5               7
Compiling a Java Program

•   To compile the program we must run with the
    Java compiler ‘javac’ with the name of the source
    file on the command line shown below

       C: javac Example.java




                         9CM604.5                       8
Executing a Java Program


•   We need to use the Java interpreter to run a
    stand alone program
•   At the command prompt type

        C: java Example




                     9CM604.5                      9
Summary

•   The process of entering and execution of a Java
    program
•   White spaces, separators, literals and keywords
•   Comment statements in Java




                        9CM604.5                      10
Quiz

1. Period . is a _________

a)   Key Words
b)   White Space
c)   Separator
d)   Comment



                     9CM604.5   11
Frequently Asked Questions

•   Explain the process of entering and executing a
    Java program
•   Explain the separators in Java
•   Write about white spaces in Java
•   List any eight keywords in Java
•   How can you write comments in Java

                       9CM604.5                       12

Weitere ähnliche Inhalte

Was ist angesagt?

First-Class Undefined Classes for Pharo, From Alternative Designs to a Unifie...
First-Class Undefined Classes for Pharo, From Alternative Designs to a Unifie...First-Class Undefined Classes for Pharo, From Alternative Designs to a Unifie...
First-Class Undefined Classes for Pharo, From Alternative Designs to a Unifie...ESUG
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentBlazing Cloud
 
Rust kafka-5-2019-unskip
Rust kafka-5-2019-unskipRust kafka-5-2019-unskip
Rust kafka-5-2019-unskipGerard Klijs
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perlnohuhu
 
КОСТЯНТИН КЛЮЄВ «Postman: API Automation Testing Swiss Army Knife» Kyiv QADay...
КОСТЯНТИН КЛЮЄВ «Postman: API Automation Testing Swiss Army Knife» Kyiv QADay...КОСТЯНТИН КЛЮЄВ «Postman: API Automation Testing Swiss Army Knife» Kyiv QADay...
КОСТЯНТИН КЛЮЄВ «Postman: API Automation Testing Swiss Army Knife» Kyiv QADay...GoQA
 
Calypso underhood
 Calypso underhood Calypso underhood
Calypso underhoodESUG
 
Rapid application development in java
Rapid application development in javaRapid application development in java
Rapid application development in javaPankaj Tiwari
 
Consume wsa
Consume wsaConsume wsa
Consume wsamahe797
 
Infinum Android Talks #09 - DBFlow ORM
Infinum Android Talks #09 - DBFlow ORMInfinum Android Talks #09 - DBFlow ORM
Infinum Android Talks #09 - DBFlow ORMInfinum
 
Developing Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptDeveloping Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptnohuhu
 
Apache james more than emails in the cloud
Apache james  more than emails in the cloudApache james  more than emails in the cloud
Apache james more than emails in the cloudIoan Eugen Stan
 
cf.Objective() 2017 - Design patterns - Brad Wood
cf.Objective() 2017 - Design patterns - Brad Woodcf.Objective() 2017 - Design patterns - Brad Wood
cf.Objective() 2017 - Design patterns - Brad WoodOrtus Solutions, Corp
 
Make sure your code works
Make sure your code worksMake sure your code works
Make sure your code worksHenrik Skupin
 
Spring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSpring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSam Brannen
 

Was ist angesagt? (20)

First-Class Undefined Classes for Pharo, From Alternative Designs to a Unifie...
First-Class Undefined Classes for Pharo, From Alternative Designs to a Unifie...First-Class Undefined Classes for Pharo, From Alternative Designs to a Unifie...
First-Class Undefined Classes for Pharo, From Alternative Designs to a Unifie...
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Rust kafka-5-2019-unskip
Rust kafka-5-2019-unskipRust kafka-5-2019-unskip
Rust kafka-5-2019-unskip
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perl
 
КОСТЯНТИН КЛЮЄВ «Postman: API Automation Testing Swiss Army Knife» Kyiv QADay...
КОСТЯНТИН КЛЮЄВ «Postman: API Automation Testing Swiss Army Knife» Kyiv QADay...КОСТЯНТИН КЛЮЄВ «Postman: API Automation Testing Swiss Army Knife» Kyiv QADay...
КОСТЯНТИН КЛЮЄВ «Postman: API Automation Testing Swiss Army Knife» Kyiv QADay...
 
Calypso underhood
 Calypso underhood Calypso underhood
Calypso underhood
 
Rapid application development in java
Rapid application development in javaRapid application development in java
Rapid application development in java
 
Consume wsa
Consume wsaConsume wsa
Consume wsa
 
Cucumber presenation
Cucumber presenationCucumber presenation
Cucumber presenation
 
Java 2
Java 2Java 2
Java 2
 
Infinum Android Talks #09 - DBFlow ORM
Infinum Android Talks #09 - DBFlow ORMInfinum Android Talks #09 - DBFlow ORM
Infinum Android Talks #09 - DBFlow ORM
 
Developing Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScriptDeveloping Rich Internet Applications with Perl and JavaScript
Developing Rich Internet Applications with Perl and JavaScript
 
Enhanced File Upload
Enhanced File UploadEnhanced File Upload
Enhanced File Upload
 
Apache james more than emails in the cloud
Apache james  more than emails in the cloudApache james  more than emails in the cloud
Apache james more than emails in the cloud
 
cf.Objective() 2017 - Design patterns - Brad Wood
cf.Objective() 2017 - Design patterns - Brad Woodcf.Objective() 2017 - Design patterns - Brad Wood
cf.Objective() 2017 - Design patterns - Brad Wood
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Make sure your code works
Make sure your code worksMake sure your code works
Make sure your code works
 
Apache James/Hupa & GWT
Apache James/Hupa & GWTApache James/Hupa & GWT
Apache James/Hupa & GWT
 
Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17
 
Spring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSpring Framework 3.2 - What's New
Spring Framework 3.2 - What's New
 

Ähnlich wie Process program9 cm604.5

Ähnlich wie Process program9 cm604.5 (20)

Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
 
Java introduction
Java introductionJava introduction
Java introduction
 
1 java programming- introduction
1  java programming- introduction1  java programming- introduction
1 java programming- introduction
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operator
 
Introduction to java technology
Introduction to java technologyIntroduction to java technology
Introduction to java technology
 
Pj01 2-install java and write first java program
Pj01 2-install java and write first java programPj01 2-install java and write first java program
Pj01 2-install java and write first java program
 
Java introduction
Java introductionJava introduction
Java introduction
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTION
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
OOP with Java
OOP with JavaOOP with Java
OOP with Java
 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
 
Java For beginners and CSIT and IT students
Java  For beginners and CSIT and IT studentsJava  For beginners and CSIT and IT students
Java For beginners and CSIT and IT students
 
1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx
 
Presentation on java
Presentation  on  javaPresentation  on  java
Presentation on java
 
Java Programming Fundamentals
Java Programming Fundamentals Java Programming Fundamentals
Java Programming Fundamentals
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Java Tutorial Lab 1
Java Tutorial Lab 1Java Tutorial Lab 1
Java Tutorial Lab 1
 
oop unit1.pptx
oop unit1.pptxoop unit1.pptx
oop unit1.pptx
 
Lec 3 01_aug13
Lec 3 01_aug13Lec 3 01_aug13
Lec 3 01_aug13
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 

Mehr von myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
2. attributes
2. attributes2. attributes
2. attributes
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 

Process program9 cm604.5

  • 1. Objectives On completion of this period, you would be able to know • The process of entering and execution of a Java program • White spaces, separators, literals and keywords • Comments in Java 9CM604.5 1
  • 2. Recap • What is a Byte Code • What are the OOP Concepts • Define Encapsulation • Define Inheritance • Define Polymorphism 9CM604.5 2
  • 3. The Process of Entering and Executing a Java Program Entering a Java Program • We can create a program using any text editor • Let us assume we have entered the following program 9CM604.5 3
  • 4. The Process of Entering and Executing a Java Contd.. Program class Example { public static void main(String args[]) { system.out.println(“Hello World”); } } 9CM604.5 4
  • 5. The Process of Entering and Executing a Java Contd.. Program • We must save this program in a file called Example.java • Ensure that the file name contains the class name • This file is called the source file 9CM604.5 5
  • 6. The Process of Entering and Executing a Java Contd.. Program • All Java source files will have the extension .java • If a program contains multiple classes, the file name must be the class name of the class containing the main method 9CM604.5 6
  • 7. Executing a Java Program Executing a Java Program involves two steps 1) Compiling a Java program 2) Running a Java program 9CM604.5 7
  • 8. Compiling a Java Program • To compile the program we must run with the Java compiler ‘javac’ with the name of the source file on the command line shown below C: javac Example.java 9CM604.5 8
  • 9. Executing a Java Program • We need to use the Java interpreter to run a stand alone program • At the command prompt type C: java Example 9CM604.5 9
  • 10. Summary • The process of entering and execution of a Java program • White spaces, separators, literals and keywords • Comment statements in Java 9CM604.5 10
  • 11. Quiz 1. Period . is a _________ a) Key Words b) White Space c) Separator d) Comment 9CM604.5 11
  • 12. Frequently Asked Questions • Explain the process of entering and executing a Java program • Explain the separators in Java • Write about white spaces in Java • List any eight keywords in Java • How can you write comments in Java 9CM604.5 12