SlideShare a Scribd company logo
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

More Related Content

PDF
Introduction to K6
PDF
Developers Testing - Girl Code at bloomon
PDF
Inheritance
PDF
Clojure@seleniumconf
PDF
A Taste of Pharo 7.0
PDF
Care and Feeding of Large Web Applications
PPTX
Asynkron programmering i Visual Studio 11
PPTX
Maven and versioning
Introduction to K6
Developers Testing - Girl Code at bloomon
Inheritance
Clojure@seleniumconf
A Taste of Pharo 7.0
Care and Feeding of Large Web Applications
Asynkron programmering i Visual Studio 11
Maven and versioning

What's hot (20)

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

Similar to Process program9 cm604.5 (20)

PPTX
Mpl 1
PDF
Java convention
DOCX
Unit of competency
PDF
java 1 new.pdf
PPTX
Computer 💻 Project Learn how to use BlueJ and more about java
PPT
Big Java Chapter 1
PPTX
Multi Threading- in Java WPS Office.pptx
PPTX
Intro to programing with java-lecture 1
PPTX
Programming in Java
PDF
Javaprogbasics
PPTX
LLLecture-JAVAPROGRAMMINGBasics1.KI.pptx
PPTX
Introduction to java
PDF
Java lab1 manual
PDF
JAVA Object Oriented Programming (OOP)
PPTX
VMC___JAVA-THIRD QUARTER-SHS TWELVE.pptx
PDF
Object Oriented Programming with Java Basic Syntax.pdf
PPTX
Introduction-to-Java-Programming-Language (1).pptx
PPT
Cso gaddis java_chapter2
PPS
Java session08
Mpl 1
Java convention
Unit of competency
java 1 new.pdf
Computer 💻 Project Learn how to use BlueJ and more about java
Big Java Chapter 1
Multi Threading- in Java WPS Office.pptx
Intro to programing with java-lecture 1
Programming in Java
Javaprogbasics
LLLecture-JAVAPROGRAMMINGBasics1.KI.pptx
Introduction to java
Java lab1 manual
JAVA Object Oriented Programming (OOP)
VMC___JAVA-THIRD QUARTER-SHS TWELVE.pptx
Object Oriented Programming with Java Basic Syntax.pdf
Introduction-to-Java-Programming-Language (1).pptx
Cso gaddis java_chapter2
Java session08
Ad

More from myrajendra (20)

PPT
Fundamentals
PPT
Data type
PPTX
Hibernate example1
PPTX
Jdbc workflow
PPTX
2 jdbc drivers
PPTX
3 jdbc api
PPTX
4 jdbc step1
PPTX
Dao example
PPTX
Sessionex1
PPTX
Internal
PPTX
3. elements
PPTX
2. attributes
PPTX
1 introduction to html
PPTX
Headings
PPTX
Forms
PPT
PPTX
Views
PPTX
Views
PPTX
Views
PPT
Starting jdbc
Fundamentals
Data type
Hibernate example1
Jdbc workflow
2 jdbc drivers
3 jdbc api
4 jdbc step1
Dao example
Sessionex1
Internal
3. elements
2. attributes
1 introduction to html
Headings
Forms
Views
Views
Views
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