slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Java Programming | Java Tutorial For Beginners | Java Training | Edureka PowerPoint Presentation
Download Presentation
Java Programming | Java Tutorial For Beginners | Java Training | Edureka

Loading in 2 Seconds...

play fullscreen
1 / 39

Java Programming | Java Tutorial For Beginners | Java Training | Edureka - PowerPoint PPT Presentation


  • 272 Views
  • Uploaded on

This Edureka Java Programming tutorial will help you in understanding the various programming fundamentals of Java in detail with examples. Below are the topics covered in this tutorial:

1) Variables
2) Data Types in Java
3) Operators in Java
4) Conditional Statements in Java
5) Loops
6) Arrays and Strings
7) Functions in Java
8) Classes and Objects in Java

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
    Presentation Transcript
    slide1

    `

    EDUREKA JAVA CERTIFICATION TRAINING

    What is Hadoop?

    https://www.edureka.co/java-j2ee-soa-training

    agenda

    Agenda

    ➢ Variables

    ➢ Data types

    ➢ Operators

    ➢ Conditional Statements

    ➢ Loops

    ➢ Arrays and Strings

    ➢ Functions

    ➢ Classes and Objects

    `

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    java installation

    Java Installation

    `

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    eclipse installation

    Eclipse Installation

    `

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    conditional statements

    Conditional

    Statements

    Classes and

    Objects

    Arrays &

    Strings

    Data types

    `

    Functions

    Operators

    Loops

    Variables

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    variable

    Variable

    Variables are nothing but reserved memory locations to store values. This means that

    when you create a variable you reserve some space in memory.

    Memory

    `

    X = 25

    int X = 25;

    float Y = 3.142857;

    boolean B = true;

    Y = 3.142857

    B = true

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    data types

    Data types

    Conditional

    Statements

    Classes and

    Objects

    Arrays &

    Strings

    `

    Functions

    Operators

    Loops

    Variables

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    data types 1

    Data types

    A data type, in programming, is a classification that specifies which type of value a variable

    has and what type of mathematical, relational or logical operations can be applied to it

    without causing an error.

    Memory

    `

    Integer

    X = 25

    int X = 25;

    float Y = 3.142857;

    boolean B = true;

    Float

    Y = 3.142857

    Boolean

    B = true

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    data types 2

    Data types

    Data types

    Float

    Boolean

    `

    Integer

    Character

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    numeric data type

    Numeric Data type

     Integer data types are used to store numeric values.

     There are four different integer types in Java:

    Integer

    1

    Float

    3 2

    byte Type

    -128 to 127

    `

    short Type

    -32768 to 32167

    Character

    3

    -2147483648 to 2147483647

    int Type

    Boolean

    4

    -9,223,372,036,854,775,808 to

    9,223,372,036,854,775,807

    long Type

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    float data type

    Float Data type

     Float data types are used to store numeric values along

    with their decimal value.

     There are two different float types in Java:

    Integer

    1

    32

    Float

    `

    float Type

    ±3.40282347E+38F

    Character

    3

    Boolean

    4

    double Type

    ±1.79769313486231570E+308

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    character data type

    Character Data type

     Character data types are used to store character values.

     char data type is a single 16-bit Unicode character:

    Integer

    1

    Float

    3 2

    `

    Character

    3

    char Type

    0 to 65,535

    Boolean

    4

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    boolean data type

    Boolean Data type

     Boolean data types are used to store boolean values along.

     This data type is used for simple flags that track true/false

    conditions

    Integer

    1

    Float

    3 2

    `

    Character

    3

    boolean Type

    True or false

    Boolean

    4

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    conditional statements 1

    Conditional

    Statements

    Classes and

    Objects

    Arrays &

    Strings

    Data types

    `

    Functions

    Loops

    Variables

    Operators

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    data operations

    Data Operations

    Operations

    Operators are the constructs which can manipulate the value of operands.

    Arithmetic

    Operators

    Relational

    Operators

    `

    Operators

    Unary

    Operators

    Logical

    Operators

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    arithmetic and relational operators

    Arithmetic and Relational Operators

    Relational

    Arithmetic

    a + b

    Addition

    a == b

    Equal To

    `

    a != b

    a – b

    Not Equal To

    Subtraction

    a > b

    Greater Than

    a * b

    Multiplication

    a < b

    Less Than

    a / b

    Division

    a >= b

    Greater Than Equal To

    a % b

    Modulus

    a <= b

    Less Than Equal To

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    unary operator

    Unary Operator

    There are two types of unary operators: Increment and Decrement

    Pre increment

    ++i

    Increment

    `

    Post increment

    i++

    Pre decrement

    --i

    Decrement

    i--

    Post decrement

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    logical operator

    Logical Operator

    There are three types of logical operators: Logical AND, Logical NOT, Logical OR

    Returns a if a is false, b otherwise

    a and b

    `

    Returns b if b is false, a otherwise

    a or b

    Returns true if a is false, false

    otherwise

    not a

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    conditional statements 2

    Conditional

    Statements

    Classes and

    Objects

    Arrays &

    Strings

    `

    Data types

    Functions

    Loops

    Operators

    Variables

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    conditional statements 3

    Conditional Statements

    If Statement

    Start

    Syntax:

    If

    Condition

    `

    TRUE

    FALSE

    If code

    End

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    conditional statements 4

    Conditional Statements

    Else If Statement

    Start

    Syntax:

    FALSE

    If

    Else If

    Condition

    Condition

    `

    FALSE

    TRUE

    TRUE

    If code

    Else If code

    End

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    conditional statements 5

    Conditional Statements

    Else Statement

    Start

    Syntax:

    FALSE

    If

    Else If

    Condition

    Condition

    `

    FALSE

    TRUE

    TRUE

    Else code

    If code

    Else If code

    End

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    conditional statements 6

    Conditional Statements

    Start

    Switch case Statement

    switch

    Condition

    Syntax:

    Case value1

    Statement 1

    break

    `

    Case value2

    Statement 2

    break

    Case value3

    Statement 3

    break

    default

    Statement

    End

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    conditional statements 7

    Conditional

    Statements

    Classes and

    Objects

    Arrays &

    Strings

    Data types

    `

    Functions

    Operators

    Variables

    Loops

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    loops in java

    Loops in Java

    A loop statement allows us to execute a statement or group of statements

    multiple times. The following diagram illustrates a loop statement:

    Loops

    START

    Loops

    `

    FALSE

    CHECK

    CONDITION

    TRUE

    repeat

    while

    EXIT LOOP

    do while

    for

    EXECUTE BLOCK

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    do while loop

    Do While Loop

    Repeats a statement or group of statements while a given condition is TRUE. It

    tests the condition after executing the loop body.

    Do While Loop

    Syntax:

    START

    `

    EXECUTE BLOCK

    repeat

    FALSE

    CHECK

    CONDITION

    TRUE

    EXIT LOOP

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    while loop

    While Loop

    Repeats a statement or group of statements while a given condition is TRUE. It

    tests the condition before executing the loop body.

    While Loop

    Syntax:

    START

    `

    FALSE

    CHECK

    CONDITION

    TRUE

    repeat

    EXIT LOOP

    EXECUTE BLOCK

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    for loop

    For Loop

    Repeats a statement or group of for a fixed number of times. It tests the

    condition before executing the loop body.

    For Loop

    Syntax:

    START

    Initialization

    `

    FALSE

    Check

    condition

    Exit loop

    TRUE

    repeat

    Execute Statements

    Iteration

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    arrays strings

    Arrays &

    Strings

    Conditional

    Statements

    Classes and

    Objects

    Data types

    `

    Functions

    Operators

    Variables

    Loops

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    array in java

    Array In Java

     An array is a data structure which holds the sequential elements of the same type.

     Arrays of any type can be created and may have one or more dimensions.

    0 1 2 3 4

    `

    E.g: array index 4 is

    holding a value of 200

    Index

    126 32

    230 21

    200

    Value

    Each index in the array

    holds a value.

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    array in java 1

    Array In Java

     Arrays can be of 2 types:

    Multi Dimensional Array

    Single Dimensional Array

    Initialization: int table[][] = new int[4][5];

    Table[2][2] = 13

    Initialization: int a[] = new int[12]

    `

    Index in Y dimension

    0 1 2 3 4

    0

    1

    2

    3

    Index in

    X dimension

    Height =4

    Width = 5

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    string in java

    String In Java

     String is a data structure which holds the sequential character.

     In Java programming language, strings are treated as objects.

    0 1 2 3 4 5

    `

    Initialization: String str = “Hello”

    H

    e

    l

    l

    o

    \0

    Str[2] Str[3] Str[4] Str[5]

    Str[0] Str[1]

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    arrays strings 1

    Arrays &

    Strings

    Conditional

    Statements

    Classes and

    Objects

    Data types

    Operators

    Variables

    Loops

    Functions

    EDUREKA DEVOPS CERTIFICATION TRAINING

    www.edureka.co/devops

    functions in java

    Functions In Java

    A function is a block of organized, reusable code that is used to perform a

    single, related action.

    Functions

    Function Add

    Functions

    `

    Return 8

    Call 1

    Call (3,5)

    Return 15

    Call 2

    Predefined

    Functions

    User Defined

    Functions

    Call (6,9)

    Call 3

    Return 6

    Call (1,5)

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    classes and objects arrays strings

    Classes and

    Objects

    Arrays &

    Strings

    Conditional

    Statements

    Data types

    `

    Operators

    Variables

    Functions

    Loops

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    classes and objects in python

    Classes and Objects in Python

     A class is the blueprint from which specific objects are created.

     Anything that has a state and behavior is object.

    Classes and Objects

    `

    Class

    Object

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training

    session in a minute

    Session In A Minute

    Conditional Statements

    Data types, Operators

    Install Java

    `

    Classes and Objects

    Loops

    Functions

    EDUREKA JAVA CERTIFICATION TRAINING

    https://www.edureka.co/java-j2ee-soa-training