SlideShare una empresa de Scribd logo
1 de 18
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”);
HOW TO CREATE BYTECODE


javap –c first

                 FILE NAME

Más contenido relacionado

La actualidad más candente

Core Java
Core JavaCore Java
Core JavaNA
 
Introduction to java
Introduction to java Introduction to java
Introduction to java Java Lover
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsMahika Tutorials
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programmingElizabeth Thomas
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Languagejaimefrozr
 
Fundamentals of JAVA
Fundamentals of JAVAFundamentals of JAVA
Fundamentals of JAVAKUNAL GADHIA
 
Java basic tutorial by sanjeevini india
Java basic tutorial by sanjeevini indiaJava basic tutorial by sanjeevini india
Java basic tutorial by sanjeevini indiaSanjeev Tripathi
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language Hitesh-Java
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaMadishetty Prathibha
 
Spring boot
Spring bootSpring boot
Spring bootsdeeg
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)arvind pandey
 
Core java concepts
Core java  conceptsCore java  concepts
Core java conceptsRam132
 

La actualidad más candente (20)

Core Java
Core JavaCore Java
Core Java
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Java
JavaJava
Java
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Java Notes
Java NotesJava Notes
Java Notes
 
Core Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika TutorialsCore Java Tutorials by Mahika Tutorials
Core Java Tutorials by Mahika Tutorials
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Fundamentals of JAVA
Fundamentals of JAVAFundamentals of JAVA
Fundamentals of JAVA
 
Introduction To Java.
Introduction To Java.Introduction To Java.
Introduction To Java.
 
Strings in Java
Strings in JavaStrings in Java
Strings in Java
 
Java basic tutorial by sanjeevini india
Java basic tutorial by sanjeevini indiaJava basic tutorial by sanjeevini india
Java basic tutorial by sanjeevini india
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
Spring boot
Spring bootSpring boot
Spring boot
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
Methods in Java
Methods in JavaMethods in Java
Methods in Java
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 

Destacado

WhiteHat Security 2014 Statistics Report Explained
WhiteHat Security 2014 Statistics Report ExplainedWhiteHat Security 2014 Statistics Report Explained
WhiteHat Security 2014 Statistics Report ExplainedJeremiah Grossman
 
Component interface
Component interfaceComponent interface
Component interfaceJAYAARC
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controllerTech_MX
 
8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijayVijay Kumar
 
8237 / 8257 DMA
8237 / 8257 DMA8237 / 8257 DMA
8237 / 8257 DMAAJAL A J
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkarSAQUIB AHMAD
 

Destacado (14)

WhiteHat Security 2014 Statistics Report Explained
WhiteHat Security 2014 Statistics Report ExplainedWhiteHat Security 2014 Statistics Report Explained
WhiteHat Security 2014 Statistics Report Explained
 
Java session2
Java session2Java session2
Java session2
 
Java String
Java String Java String
Java String
 
Wrapper class
Wrapper classWrapper class
Wrapper class
 
Component interface
Component interfaceComponent interface
Component interface
 
Data transferschemes
Data transferschemesData transferschemes
Data transferschemes
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
 
Macro
MacroMacro
Macro
 
8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay8259 Programmable Interrupt Controller by vijay
8259 Programmable Interrupt Controller by vijay
 
8237 / 8257 DMA
8237 / 8257 DMA8237 / 8257 DMA
8237 / 8257 DMA
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
8085 microprocessor ramesh gaonkar
8085 microprocessor   ramesh gaonkar8085 microprocessor   ramesh gaonkar
8085 microprocessor ramesh gaonkar
 
Core java complete notes - Contact at +91-814-614-5674
Core java complete notes - Contact at +91-814-614-5674Core java complete notes - Contact at +91-814-614-5674
Core java complete notes - Contact at +91-814-614-5674
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 

Similar a Programming in Java

Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
 
1 introduction
1 introduction1 introduction
1 introductionMks Khalid
 
Java-1st.pptx about Java technology before oops
Java-1st.pptx about Java technology before oopsJava-1st.pptx about Java technology before oops
Java-1st.pptx about Java technology before oopsbuvanabala
 
Top 10 Important Core Java Interview questions and answers.pdf
Top 10 Important Core Java Interview questions and answers.pdfTop 10 Important Core Java Interview questions and answers.pdf
Top 10 Important Core Java Interview questions and answers.pdfUmesh Kumar
 
Lecture - 2 Environment setup & JDK, JRE, JVM
Lecture - 2 Environment setup & JDK, JRE, JVMLecture - 2 Environment setup & JDK, JRE, JVM
Lecture - 2 Environment setup & JDK, JRE, JVMmanish kumar
 
Intoduction to java
Intoduction to javaIntoduction to java
Intoduction to javajalinder123
 

Similar a Programming in Java (20)

Java platform
Java platformJava platform
Java platform
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
 
Mpl 1
Mpl 1Mpl 1
Mpl 1
 
Java
JavaJava
Java
 
1.introduction to java
1.introduction to java1.introduction to java
1.introduction to java
 
Java introduction
Java introductionJava introduction
Java introduction
 
JAVA Program Examples
JAVA Program ExamplesJAVA Program Examples
JAVA Program Examples
 
1 introduction
1 introduction1 introduction
1 introduction
 
java basics.pptx
java basics.pptxjava basics.pptx
java basics.pptx
 
Java-1st.pptx about Java technology before oops
Java-1st.pptx about Java technology before oopsJava-1st.pptx about Java technology before oops
Java-1st.pptx about Java technology before oops
 
OOPS JAVA.pdf
OOPS JAVA.pdfOOPS JAVA.pdf
OOPS JAVA.pdf
 
Javalecture 1
Javalecture 1Javalecture 1
Javalecture 1
 
Java basics notes
Java basics notesJava basics notes
Java basics notes
 
Introduction java programming
Introduction java programmingIntroduction java programming
Introduction java programming
 
Unit1 JAVA.pptx
Unit1 JAVA.pptxUnit1 JAVA.pptx
Unit1 JAVA.pptx
 
Java lab-manual
Java lab-manualJava lab-manual
Java lab-manual
 
Top 10 Important Core Java Interview questions and answers.pdf
Top 10 Important Core Java Interview questions and answers.pdfTop 10 Important Core Java Interview questions and answers.pdf
Top 10 Important Core Java Interview questions and answers.pdf
 
Lecture - 2 Environment setup & JDK, JRE, JVM
Lecture - 2 Environment setup & JDK, JRE, JVMLecture - 2 Environment setup & JDK, JRE, JVM
Lecture - 2 Environment setup & JDK, JRE, JVM
 
Curso de Programación Java Básico
Curso de Programación Java BásicoCurso de Programación Java Básico
Curso de Programación Java Básico
 
Intoduction to java
Intoduction to javaIntoduction to java
Intoduction to java
 

Más de Abhilash Nair

Sequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsSequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsAbhilash Nair
 
Designing Clocked Synchronous State Machine
Designing Clocked Synchronous State MachineDesigning Clocked Synchronous State Machine
Designing Clocked Synchronous State MachineAbhilash Nair
 
VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)Abhilash Nair
 
Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Abhilash Nair
 
Feedback Sequential Circuits
Feedback Sequential CircuitsFeedback Sequential Circuits
Feedback Sequential CircuitsAbhilash Nair
 
Designing State Machine
Designing State MachineDesigning State Machine
Designing State MachineAbhilash Nair
 
State Machine Design and Synthesis
State Machine Design and SynthesisState Machine Design and Synthesis
State Machine Design and SynthesisAbhilash Nair
 
Synchronous design process
Synchronous design processSynchronous design process
Synchronous design processAbhilash Nair
 
Analysis of state machines & Conversion of models
Analysis of state machines & Conversion of modelsAnalysis of state machines & Conversion of models
Analysis of state machines & Conversion of modelsAbhilash Nair
 
Analysis of state machines
Analysis of state machinesAnalysis of state machines
Analysis of state machinesAbhilash Nair
 
Sequential Circuits - Flip Flops (Part 2)
Sequential Circuits - Flip Flops (Part 2)Sequential Circuits - Flip Flops (Part 2)
Sequential Circuits - Flip Flops (Part 2)Abhilash Nair
 
Sequential Circuits - Flip Flops (Part 1)
Sequential Circuits - Flip Flops (Part 1)Sequential Circuits - Flip Flops (Part 1)
Sequential Circuits - Flip Flops (Part 1)Abhilash Nair
 

Más de Abhilash Nair (20)

Sequential Circuits - Flip Flops
Sequential Circuits - Flip FlopsSequential Circuits - Flip Flops
Sequential Circuits - Flip Flops
 
VHDL Part 4
VHDL Part 4VHDL Part 4
VHDL Part 4
 
Designing Clocked Synchronous State Machine
Designing Clocked Synchronous State MachineDesigning Clocked Synchronous State Machine
Designing Clocked Synchronous State Machine
 
MSI Shift Registers
MSI Shift RegistersMSI Shift Registers
MSI Shift Registers
 
VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)VHDL - Enumerated Types (Part 3)
VHDL - Enumerated Types (Part 3)
 
VHDL - Part 2
VHDL - Part 2VHDL - Part 2
VHDL - Part 2
 
Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Introduction to VHDL - Part 1
Introduction to VHDL - Part 1
 
Feedback Sequential Circuits
Feedback Sequential CircuitsFeedback Sequential Circuits
Feedback Sequential Circuits
 
Designing State Machine
Designing State MachineDesigning State Machine
Designing State Machine
 
State Machine Design and Synthesis
State Machine Design and SynthesisState Machine Design and Synthesis
State Machine Design and Synthesis
 
Synchronous design process
Synchronous design processSynchronous design process
Synchronous design process
 
Analysis of state machines & Conversion of models
Analysis of state machines & Conversion of modelsAnalysis of state machines & Conversion of models
Analysis of state machines & Conversion of models
 
Analysis of state machines
Analysis of state machinesAnalysis of state machines
Analysis of state machines
 
Sequential Circuits - Flip Flops (Part 2)
Sequential Circuits - Flip Flops (Part 2)Sequential Circuits - Flip Flops (Part 2)
Sequential Circuits - Flip Flops (Part 2)
 
Sequential Circuits - Flip Flops (Part 1)
Sequential Circuits - Flip Flops (Part 1)Sequential Circuits - Flip Flops (Part 1)
Sequential Circuits - Flip Flops (Part 1)
 
FPGA
FPGAFPGA
FPGA
 
FPLDs
FPLDsFPLDs
FPLDs
 
CPLDs
CPLDsCPLDs
CPLDs
 
CPLD & FPLD
CPLD & FPLDCPLD & FPLD
CPLD & FPLD
 
CPLDs
CPLDsCPLDs
CPLDs
 

Último

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 

Último (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

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”);
  • 17.
  • 18. HOW TO CREATE BYTECODE javap –c first FILE NAME