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

Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Languagejaimefrozr
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.netMUKALU STEVEN
 
Control Statements in Java
Control Statements in JavaControl Statements in Java
Control Statements in JavaNiloy Saha
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaSaba Ameer
 
Web development tool
Web development toolWeb development tool
Web development toolDeep Bhavsar
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)Sujit Majety
 
Text Editor for System Software
Text Editor for System Software Text Editor for System Software
Text Editor for System Software Vaishnavi K
 
Java Data Types
Java Data TypesJava Data Types
Java Data TypesSpotle.ai
 
Graphical User Interface (Gui)
Graphical User Interface (Gui)Graphical User Interface (Gui)
Graphical User Interface (Gui)Bilal Amjad
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)arvind pandey
 
Java Development Kit (jdk)
Java Development Kit (jdk)Java Development Kit (jdk)
Java Development Kit (jdk)Jadavsejal
 

La actualidad más candente (20)

Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
 
Java I/O
Java I/OJava I/O
Java I/O
 
Control Statements in Java
Control Statements in JavaControl Statements in Java
Control Statements in Java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Web development tool
Web development toolWeb development tool
Web development tool
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Text Editor for System Software
Text Editor for System Software Text Editor for System Software
Text Editor for System Software
 
Servlets
ServletsServlets
Servlets
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Core java slides
Core java slidesCore java slides
Core java slides
 
Java
JavaJava
Java
 
Java Data Types
Java Data TypesJava Data Types
Java Data Types
 
Graphical User Interface (Gui)
Graphical User Interface (Gui)Graphical User Interface (Gui)
Graphical User Interface (Gui)
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
Java Development Kit (jdk)
Java Development Kit (jdk)Java Development Kit (jdk)
Java Development Kit (jdk)
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Java seminar
Java seminarJava seminar
Java seminar
 

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
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java ProgrammingRavi Kant Sahu
 
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
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
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
 

Similar a Programming in Java

Similar a Programming in Java (20)

Java platform
Java platformJava platform
Java platform
 
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
 
Dr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :Intoduction to javaDr. Rajeshree Khande :Intoduction to java
Dr. Rajeshree Khande :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

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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
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
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
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
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
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
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 

Último (20)

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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
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
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
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
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

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