Java Intro

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Java Intro - Presentation Transcript

    1. U Nyein Oo Director/COO(IT) Myanma Computer Co., Ltd IADCS Diploma Course Advanced Java
    2. Subject Content
      • 1. Introduction to Java & OOP
      • 2. Programming in Java
      • 3. Types- Primitive, Reference and Garbage Collection
      • 4. Classes and Packages with OO Programming
      • 5. Exception Handling with Java
      • 6. Object Cloning and RTTI
      • 7. Programming I/O within Java
    3. Subject Content (cont)
      • 8. Object & Classes in Java
      • 9. Multithreading
      • 10. Introduction to GUI
      • 11. Programming Windows and Events
      • 12. Client side Java, Applets and JavaBeans
      • 13. Network Programming with Java
      • 14. Programming Server-side Java
    4. Application of Java
      • Inline sound that play in real time whenever
      • a user loads a page
      • Music that plays in the background on a page
      • Cartoon Style Animations
      • Real time Video
      • Multiplayer interactive games
    5. Introduction to Java
      • - Object Oriented Programming - Developed by Sun Microsystems - At USA in 1991 by James Gosling .
      • Originally called Oak - Platform Independent Language.
      • Internet Programming Language.
    6. Features of Java
      • Simple
      • Object-oriented
      • Platform-independent
      • Robust
      • Safe (Secure)
      • High Performance
      • Multithreaded
      • Distributed
      • Dynamic
    7. Types of Java Programs
      • Applications
        • Command Line
        • GUI
      • Applets
      • Servlets
      • Packages
      • Database Applications
    8. Command Line Application // Sample Java Program   class HelloWorld{ public static void main(String args[]) { System.out.println(“Helloworld ”); } }
    9. Compilation code in Java
    10. Traditional way of compilation
    11. Compiling the sample program
      • C:jdkin>javac HelloWorld.java
      • C:jdkin>java HelloWorld
      • Output
        • “ Hello World!”
    12. JDK Tools
      • Java Compiler, 'javac'
      • Java Interpreter, 'java'
      • Java Dissembler, 'javap'
      • Documentation tool, 'javadoc'
      • Java Debugger, 'jdb‘
      • Applet viewer, 'appletviewer‘
    13. Programming in Java
      • Variables & Reserved Words
      • Data types & Operators
      • Control Structure
      • Array Handling
      • Classes & Methods
      • String & Maths Classes
    14. Primitive Types
      • byte
      • char
      • boolean
      • short
      • int
      • long
      • float
      • Double
      Reference Types Java Type
      • long
      • float
      • Double
    15. Operators
      • Types of operators
        • Arithmetic operators
        • Bitwise operators
        • Relational operators
        • Logical operators
        • Conditional operator
        • Assignment operator
    16. Arithmetic Operators + Addition - Subtraction * Multiplication / Division % Modulus ++ Increment -- Decrement
    17. Arithmetic Operators (Contd…) += Addition and assignment -= Subtraction and assignment *= Multiplication and assignment /= Division and assignment %= Modulus and assignment
    18. Relational Operators == Equal to != Not equal to < Less than > Greater than <= Less than or equal to >= Greater than or equal to
    19. Logical Operators
      • && Logical AND
      • || Logical OR
      • ! Logical unary NOT
    20. Conditional Operator
      • Syntax
      • expression1 ? expression2 : expression3;
      •   expression1
      • Boolean condition that returns a True or False value
      • Expression2
      • Value returned if expression1 evaluates to True
      • expression3
      • Value returned if exp1 evaluates to False
    21. Control Flow
      • Decision-making
        • if-else statement
        • switch-case statement
      • Loop
        • while loop
        • do-while loop
        • for loop
    22. Array Declarations
      • Three ways for Array Declaration
        • datatype identifier [ ];
        • datatype identifier [ ] = new datatype[size];
        • datatype identifier [ ]= {value1,value2,….valueN};
    23. Methods in Classes
      • A method is defined as the actual implementation of an operation on an object
      • Syntax
        • access_specifier modifier datatype method_name(parameter_list)
        • {
        • //body of method
        • }
    24. Sample usage of Method class Temp { static int x = 10; // variable public static void show( ) { // method System.out.println(x); } public static void main(String args[ ]) { Temp t = new Temp( ); // object 1 t.show( ); // method call Temp t1 = new Temp( ); // object 2 t1.x = 20; t1.show(); }}
    25. String Class
      • Constructor methods
        • String str1 = new String();
        • String str2 = new String(“Hello World”);
        • char ch[ ] = {“A”,”B”,”C”,”D”,”E”};
        • String str3 = new String(ch);
        • String str4 = new String(ch,0,2);
    26. String Class Methods
      • charAt( )
      • startsWith()
      • endsWith( )
      • copyValueOf( )
      • toCharArray( )
      • indexOf( )
      • toUpperCase( )
      • toLowerCase( )
      • trim( )
      • equals( )
    27. java.lang.Math Class
      • abs()
      • ceil()
      • floor()
      • max()
      • min()
      • round()
      • random()
      • sqrt()
      • sin()
      • cos()
      • tan()
      • java.lang
      • java.applet
      • java.awt
      • java.io
      • java.util
      Core Java API
      • java.net
      • java.awt.event
      • java.rmi
      • java.security
      • java.sql
      • // Text string example
      • class Test_String
      • {
      • public static void main(String args[])
      • {
      • String name=&quot; Hello Java Programming &quot;;
      • char ch=name.charAt(6);
      • boolean flag1=name.startsWith(&quot;Hello&quot;);
      • boolean flag2=name.endsWith(&quot;Java&quot;);
      • char nname[]={'l','a','n','g','u','a','g','e'};
      • String subname=name.copyValueOf(nname,5,3);
      • int ind1=name.indexOf('J');
      • String up=name.toUpperCase();
      • String lo=name.toLowerCase();
      • String name2=name.trim();
      • System.out.println(&quot;charAt &quot; + ch);
      • System.out.println(&quot;Startswith java is &quot;+flag1);
      • System.out.println(&quot;Endswith java is &quot;+flag2);
      • System.out.println(&quot;copy value of &quot;+subname);
      • System.out.println(&quot;Index of &quot;+ind1);
      • System.out.println(&quot;To upper case &quot;+up);
      • System.out.println(&quot;To lower case &quot;+lo);
      • System.out.println(&quot;Trimming is &quot;+name2);
      • }
      • }
      • /*---Maths Classes---*/
      • public class math_methods{
      • public static void main(String[] args) {
        • final double PI=Math.PI;
        • final double E=Math.E;
        • System.out.println(&quot;E =&quot;+E);
        • System.out.println(&quot;Math.exp(1.0) =&quot;+Math.exp(1.0));
        • System.out.println(&quot;PI =&quot;+PI);
        • System.out.println(&quot;4*Math.atan(1.0) =&quot;+Math.atan(1.0));
        • System.out.println(&quot;Math.cos(2*PI) =&quot;+Math.cos(2*PI));
        • System.out.println(&quot;Math.sin(PI/2) =&quot;+Math.sin(PI/2));
        • System.out.println(&quot;Math.cos(PI/4) =&quot;+Math.cos(PI/4));
      • System.out.println(&quot;Math.log(E) =&quot;+Math.log(E));
        • System.out.println(&quot;Math.abs(-13.579) =&quot;+Math.abs(-13.579));
        • System.out.println(&quot;Math.floor(13.579) =&quot;+Math.floor(13.579));
        • System.out.println(&quot;Math.ceil(13.579) =&quot;+Math.ceil(13.579));
        • System.out.println(&quot;Math.round(13.579) =&quot;+Math.round(13.579));
        • System.out.println(&quot;Math.pow(25.0,0.5) =&quot;+Math.pow(25.0,0.5));
        • System.out.println(&quot;Math.sqrt(25.0) =&quot;+Math.sqrt(25.0));
        • System.out.println(&quot;Math.random() =&quot;+Math.random());
        • System.out.println(&quot;Math.random() =&quot;+(10*Math.random()));
      • }
      • }

    + backdoorbackdoor, 3 years ago

    custom

    691 views, 0 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 691
      • 691 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 54
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories