SlideShare a Scribd company logo
JAVA BUZZWORDS
                 (Features)
   The most striking feature of the language is that it is PLATFORM-
    NEUTRAL language.

   Is the FIRST programming language that is not tied to any particular
    hardware or OS.

   JAVA programs can be executed anywhere on any system.
                               BUZZWORDS.
      Compiled & Interpreted            Multi-Threaded
      Platform-Independent & Portable   Object-Oriented
      Simple                            High Performance
      Safe (Secure) & Robust            Dynamically Linked
      Garbage Collected.                Distributed
PROGRAMMING IN JAVA
             -Ankita Karia
JAVA ENVIRONMENT
                              JAVA ENVIRONMENT


          DEVELOPMENT TOOLS                       CLASSES AND METHODS.

                                              Are part of JSL (Java Standard
 are part of the system known as JDK
                                              Library), also known as API
       (Java Development Kit).
                                              (Application Programming Interface)


Collection of tools used for developing and
running JAVA programs
JAVA DEVELOPMENT KIT
   java –This tool is an interpreter and can interpret the
    class files generated by the javac compiler
   javac – the compiler, which converts source code into
    Java bytecode
   javadoc – the documentation generator, which
    automatically generates documentation from source code
   jdb – the debugger
   javap – the class file disassembler
   appletviewer– this tool can be used to run and debug
    Java applets without a web browser
EXECUTION STEPS IN JAVA
 To create a program in JAVA, we need to create a source code file
  using a text editor.
 The source code is then compiled using the JAVA COMPLIER javac

 And then the program is executed using JAVA interpreter java.


    TEXT EDITOR                  Compile
                               source code
                              into bytecode
        JAVA SOURCE                           JAVA PROGRAM
           CODE                                  OUTPUT


                                                      INTERPRETER
                      javac


                              JAVA CLASS
                                                     java
                                 FILE
HOW TO WRITE
                       A
               JAVA PROGRAM?????
     C++ program                        JAVA Program
                           class First
                           {
void main()                  public static void main( String args[])
{                               {
  cout<< “ My first C++          System.out.println(“My first JAVA
   program”;                 program”);
  getch();                    }
}                         }


          Since, JAVA is a true OO Language,
        Everything must be placed inside a class.
WHERE TO WRITE JAVA PROGRAM
   TEXT EDITOR IS USED to write JAVA program
NEXT WHAT??????????
 Save your program with file name same as class name.
 Extension of the file is java (eg:- first.java)
NEXT WHAT??????????
 Compile  your program using javac compiler.
 For that go to DOS prompt;




 Go to drive where your java file is stored
NEXT WHAT??????????
 STEP   2
NEXT IMPORTANT STEP
Compiling USING javac compiler
EXECUTION OF BYTECODE USING
       JAVA INTERPRETER
EXPLANATION OF PROGRAM
  public      Is an ACCESS SPECIFIER that declares
              main as unprotected & thus is accessible to
              all classes
   static     Declares the method as one that belongs to
              entire class
   void       Means main does not returns value
   args       Contains an array of objects of the class
              type String
System.out.println is similar to “cout” of C++
            println          Is a method and it is a
                             member of out object
             out             Is a static data member
                             of System class.
            System           Is a class
MORE ON BASICS OF JAVA
 OUTOUT          STATEMENTS:
       println(name);
          prints out what is stored in name, then goes to a new line

       print(name);
          prints out what is stored in name, but does not start a new line

       print("My name is " + name);
          put text in quotes

          use + to print more than one item.



       COMMENTS:
   JAVA permits both single-line and multi-line comments.

   Single-line comments starts with    //
   Multi-line comments starts      with /* and ends with */
MORE ON BASICS OF JAVA
 Every JAVA statement must end with a semicolon.
 JAVA is case-sensitive.
 Thus, Main is different from main in JAVA.

                   CASCADING IN JAVA
   + is used to print more than one item.
E.g.:-
System.out.println(“GOOD MORNING”);
System.out.println(“FE6”);
System.out.println(“CP II Lecture”);
                            OR
System.out.println(“GOOD MORNING”+”n FE6”+”t CP II Lecture”);
Programming in Java
HOW TO CREATE BYTECODE


javap –c first

                 FILE NAME

More Related Content

What's hot (20)

PDF
Bootstrap
Jadson Santos
 
PPT
Css Ppt
Hema Prasanth
 
PPTX
Super keyword in java
Hitesh Kumar
 
PPT
JavaScript - An Introduction
Manvendra Singh
 
PPTX
Java Server Pages(jsp)
Manisha Keim
 
PPTX
C# 101: Intro to Programming with C#
Hawkman Academy
 
PPTX
String in java
Ideal Eyes Business College
 
PPTX
Arrays in java
Arzath Areeff
 
PPTX
Introduction to ASP.NET
Rajkumarsoy
 
PPTX
Computer Science:Java jdbc
St Mary's College,Thrissur,Kerala
 
PPTX
Introduction to java
Sandeep Rawat
 
PPSX
JDBC: java DataBase connectivity
Tanmoy Barman
 
PPTX
Jdk,jre,jvm
Kritika Goel
 
PPTX
servlet in java
sowfi
 
PDF
Java Presentation For Syntax
PravinYalameli
 
PPT
PHP - Introduction to Object Oriented Programming with PHP
Vibrant Technologies & Computers
 
PPTX
Introduction to JavaScript
Megha V
 
Bootstrap
Jadson Santos
 
Css Ppt
Hema Prasanth
 
Super keyword in java
Hitesh Kumar
 
JavaScript - An Introduction
Manvendra Singh
 
Java Server Pages(jsp)
Manisha Keim
 
C# 101: Intro to Programming with C#
Hawkman Academy
 
Arrays in java
Arzath Areeff
 
Introduction to ASP.NET
Rajkumarsoy
 
Computer Science:Java jdbc
St Mary's College,Thrissur,Kerala
 
Introduction to java
Sandeep Rawat
 
JDBC: java DataBase connectivity
Tanmoy Barman
 
Jdk,jre,jvm
Kritika Goel
 
servlet in java
sowfi
 
Java Presentation For Syntax
PravinYalameli
 
PHP - Introduction to Object Oriented Programming with PHP
Vibrant Technologies & Computers
 
Introduction to JavaScript
Megha V
 

Viewers also liked (15)

PPTX
WhiteHat Security 2014 Statistics Report Explained
Jeremiah Grossman
 
PPTX
Java session2
Jigarthacker
 
PPTX
Java String
SATYAM SHRIVASTAV
 
PPS
Wrapper class
kamal kotecha
 
PPTX
Component interface
JAYAARC
 
PPT
Data transferschemes
Ankush Srivastava
 
PPTX
8237 dma controller
Tech_MX
 
PPT
Macro
Google
 
PPTX
8259 Programmable Interrupt Controller by vijay
Vijay Kumar
 
PPT
8237 / 8257 DMA
AJAL A J
 
PPT
Object-oriented concepts
BG Java EE Course
 
PDF
Introduction to Java Programming
Ravi Kant Sahu
 
PDF
8085 microprocessor ramesh gaonkar
SAQUIB AHMAD
 
PDF
Core java complete notes - Contact at +91-814-614-5674
Lokesh Kakkar Mobile No. 814-614-5674
 
PPTX
Introduction to java
Veerabadra Badra
 
WhiteHat Security 2014 Statistics Report Explained
Jeremiah Grossman
 
Java session2
Jigarthacker
 
Java String
SATYAM SHRIVASTAV
 
Wrapper class
kamal kotecha
 
Component interface
JAYAARC
 
Data transferschemes
Ankush Srivastava
 
8237 dma controller
Tech_MX
 
Macro
Google
 
8259 Programmable Interrupt Controller by vijay
Vijay Kumar
 
8237 / 8257 DMA
AJAL A J
 
Object-oriented concepts
BG Java EE Course
 
Introduction to Java Programming
Ravi Kant Sahu
 
8085 microprocessor ramesh gaonkar
SAQUIB AHMAD
 
Core java complete notes - Contact at +91-814-614-5674
Lokesh Kakkar Mobile No. 814-614-5674
 
Introduction to java
Veerabadra Badra
 
Ad

Similar to Programming in Java (20)

PPTX
Mpl 1
AHHAAH
 
PPT
j-chap1-Basics.ppt
SmitaBorkar9
 
PDF
OOPS JAVA.pdf
DeepanshuMidha5140
 
PPTX
LECTURE 2 -Object oriented Java Basics.pptx
AOmaAli
 
PDF
Core java part1
VenkataBolagani
 
PDF
java notes.pdf
JitendraYadav351971
 
PPTX
What is Java, JDK, JVM, Introduction to Java.pptx
kumarsuneel3997
 
PPTX
01. Introduction to programming with java
Intro C# Book
 
DOCX
Unit2 java
mrecedu
 
PPT
Java introduction
logeswarisaravanan
 
PPT
Java-Unit-I.ppt
RameswarGprec
 
PPTX
Programming in java ppt
MrsRLakshmiIT
 
PPTX
Programming in java ppt
MrsRBoomadeviIT
 
PPTX
Java Programming Tutorials Basic to Advanced 1
JALALUDHEENVK1
 
PPTX
Java Notes
Sreedhar Chowdam
 
PPTX
Java Notes by C. Sreedhar, GPREC
Sreedhar Chowdam
 
PPTX
Assignmentjsnsnshshusjdnsnshhzudjdndndjd
tusharjain613841
 
PPTX
Java
Zeeshan Khan
 
DOCX
Srgoc java
Gaurav Singh
 
PPT
java-corporate-training-institute-in-mumbai
Unmesh Baile
 
Mpl 1
AHHAAH
 
j-chap1-Basics.ppt
SmitaBorkar9
 
OOPS JAVA.pdf
DeepanshuMidha5140
 
LECTURE 2 -Object oriented Java Basics.pptx
AOmaAli
 
Core java part1
VenkataBolagani
 
java notes.pdf
JitendraYadav351971
 
What is Java, JDK, JVM, Introduction to Java.pptx
kumarsuneel3997
 
01. Introduction to programming with java
Intro C# Book
 
Unit2 java
mrecedu
 
Java introduction
logeswarisaravanan
 
Java-Unit-I.ppt
RameswarGprec
 
Programming in java ppt
MrsRLakshmiIT
 
Programming in java ppt
MrsRBoomadeviIT
 
Java Programming Tutorials Basic to Advanced 1
JALALUDHEENVK1
 
Java Notes
Sreedhar Chowdam
 
Java Notes by C. Sreedhar, GPREC
Sreedhar Chowdam
 
Assignmentjsnsnshshusjdnsnshhzudjdndndjd
tusharjain613841
 
Srgoc java
Gaurav Singh
 
java-corporate-training-institute-in-mumbai
Unmesh Baile
 
Ad

More from Abhilash Nair (20)

PPT
Sequential Circuits - Flip Flops
Abhilash Nair
 
PPT
VHDL Part 4
Abhilash Nair
 
PPT
Designing Clocked Synchronous State Machine
Abhilash Nair
 
PPT
MSI Shift Registers
Abhilash Nair
 
PPT
VHDL - Enumerated Types (Part 3)
Abhilash Nair
 
PPT
VHDL - Part 2
Abhilash Nair
 
PPT
Introduction to VHDL - Part 1
Abhilash Nair
 
PPT
Feedback Sequential Circuits
Abhilash Nair
 
PPT
Designing State Machine
Abhilash Nair
 
PPT
State Machine Design and Synthesis
Abhilash Nair
 
PPT
Synchronous design process
Abhilash Nair
 
PPT
Analysis of state machines & Conversion of models
Abhilash Nair
 
PPT
Analysis of state machines
Abhilash Nair
 
PPT
Sequential Circuits - Flip Flops (Part 2)
Abhilash Nair
 
PPT
Sequential Circuits - Flip Flops (Part 1)
Abhilash Nair
 
PPT
FPGA
Abhilash Nair
 
PPT
FPLDs
Abhilash Nair
 
PPT
CPLDs
Abhilash Nair
 
PPT
CPLD & FPLD
Abhilash Nair
 
PPT
CPLDs
Abhilash Nair
 
Sequential Circuits - Flip Flops
Abhilash Nair
 
VHDL Part 4
Abhilash Nair
 
Designing Clocked Synchronous State Machine
Abhilash Nair
 
MSI Shift Registers
Abhilash Nair
 
VHDL - Enumerated Types (Part 3)
Abhilash Nair
 
VHDL - Part 2
Abhilash Nair
 
Introduction to VHDL - Part 1
Abhilash Nair
 
Feedback Sequential Circuits
Abhilash Nair
 
Designing State Machine
Abhilash Nair
 
State Machine Design and Synthesis
Abhilash Nair
 
Synchronous design process
Abhilash Nair
 
Analysis of state machines & Conversion of models
Abhilash Nair
 
Analysis of state machines
Abhilash Nair
 
Sequential Circuits - Flip Flops (Part 2)
Abhilash Nair
 
Sequential Circuits - Flip Flops (Part 1)
Abhilash Nair
 
CPLD & FPLD
Abhilash Nair
 

Recently uploaded (20)

PPTX
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
PDF
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PDF
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
PDF
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PDF
Introduction presentation of the patentbutler tool
MIPLM
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PDF
Council of Chalcedon Re-Examined
Smiling Lungs
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PPTX
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
PDF
epi editorial commitee meeting presentation
MIPLM
 
PPTX
Introduction to Indian Writing in English
Trushali Dodiya
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PDF
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
PPTX
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
PDF
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
Introduction presentation of the patentbutler tool
MIPLM
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
Council of Chalcedon Re-Examined
Smiling Lungs
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
epi editorial commitee meeting presentation
MIPLM
 
Introduction to Indian Writing in English
Trushali Dodiya
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Horarios de distribución de agua en julio
pegazohn1978
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 

Programming in Java

  • 1. JAVA BUZZWORDS (Features)  The most striking feature of the language is that it is PLATFORM- NEUTRAL language.  Is the FIRST programming language that is not tied to any particular hardware or OS.  JAVA programs can be executed anywhere on any system. BUZZWORDS. Compiled & Interpreted Multi-Threaded Platform-Independent & Portable Object-Oriented Simple High Performance Safe (Secure) & Robust Dynamically Linked Garbage Collected. Distributed
  • 2. PROGRAMMING IN JAVA -Ankita Karia
  • 3. JAVA ENVIRONMENT JAVA ENVIRONMENT DEVELOPMENT TOOLS CLASSES AND METHODS. Are part of JSL (Java Standard are part of the system known as JDK Library), also known as API (Java Development Kit). (Application Programming Interface) Collection of tools used for developing and running JAVA programs
  • 4. JAVA DEVELOPMENT KIT  java –This tool is an interpreter and can interpret the class files generated by the javac compiler  javac – the compiler, which converts source code into Java bytecode  javadoc – the documentation generator, which automatically generates documentation from source code  jdb – the debugger  javap – the class file disassembler  appletviewer– this tool can be used to run and debug Java applets without a web browser
  • 5. EXECUTION STEPS IN JAVA  To create a program in JAVA, we need to create a source code file using a text editor.  The source code is then compiled using the JAVA COMPLIER javac  And then the program is executed using JAVA interpreter java. TEXT EDITOR Compile source code into bytecode JAVA SOURCE JAVA PROGRAM CODE OUTPUT INTERPRETER javac JAVA CLASS java FILE
  • 6. HOW TO WRITE A JAVA PROGRAM????? C++ program JAVA Program class First { void main() public static void main( String args[]) { { cout<< “ My first C++ System.out.println(“My first JAVA program”; program”); getch(); } } } Since, JAVA is a true OO Language, Everything must be placed inside a class.
  • 7. WHERE TO WRITE JAVA PROGRAM  TEXT EDITOR IS USED to write JAVA program
  • 8. NEXT WHAT??????????  Save your program with file name same as class name.  Extension of the file is java (eg:- first.java)
  • 9. NEXT WHAT??????????  Compile your program using javac compiler.  For that go to DOS prompt; Go to drive where your java file is stored
  • 13. EXECUTION OF BYTECODE USING JAVA INTERPRETER
  • 14. EXPLANATION OF PROGRAM public Is an ACCESS SPECIFIER that declares main as unprotected & thus is accessible to all classes static Declares the method as one that belongs to entire class void Means main does not returns value args Contains an array of objects of the class type String System.out.println is similar to “cout” of C++ println Is a method and it is a member of out object out Is a static data member of System class. System Is a class
  • 15. MORE ON BASICS OF JAVA  OUTOUT STATEMENTS:  println(name);  prints out what is stored in name, then goes to a new line  print(name);  prints out what is stored in name, but does not start a new line  print("My name is " + name);  put text in quotes  use + to print more than one item.  COMMENTS:  JAVA permits both single-line and multi-line comments.  Single-line comments starts with //  Multi-line comments starts with /* and ends with */
  • 16. MORE ON BASICS OF JAVA  Every JAVA statement must end with a semicolon.  JAVA is case-sensitive.  Thus, Main is different from main in JAVA. CASCADING IN JAVA  + is used to print more than one item. E.g.:- System.out.println(“GOOD MORNING”); System.out.println(“FE6”); System.out.println(“CP II Lecture”); OR System.out.println(“GOOD MORNING”+”n FE6”+”t CP II Lecture”);
  • 18. HOW TO CREATE BYTECODE javap –c first FILE NAME