SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
Visual basic
Visual basicVisual basic
Visual basic
 
Java
JavaJava
Java
 
History of java'
History of java'History of java'
History of java'
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptx
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
class and objects
class and objectsclass and objects
class and objects
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan Sanidhya
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
C language ppt
C language pptC language ppt
C language ppt
 
Object Oriented Programming Languages
Object Oriented Programming LanguagesObject Oriented Programming Languages
Object Oriented Programming Languages
 
Command line arguments
Command line argumentsCommand line arguments
Command line arguments
 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
 
Java features
Java featuresJava features
Java features
 
core java
core javacore java
core java
 
JVM
JVMJVM
JVM
 

Andere mochten auch

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
 

Andere mochten auch (12)

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
 
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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
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
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
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
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
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
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
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
 
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
 
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
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 

Kürzlich hochgeladen (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
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
 
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
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
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
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
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Ữ Â...
 
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
 
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
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.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