Core Java Tutorial

Define Java

C vs C++ vs Java

Java Virtual Machine

Java First Program

Java Data Types

Java Tokens

Java Keywords

Java Operators

Operator Precedence

Java Type Casting

Java Statement

Java If statement

Java Switch statement

Java Loops

Java Jumping Statement

Java Arrays 1D

Java Arrays 2D

Java Variable Size Array

Java Vector

Java Math Methods

Java String Methods

Java String Buffer

User-Defined Method

Java Method Overloading

Java Class & Object

Java Constructor

Java Inheritance

Java Interface

Java Packages

Java Multi-threading

Exceptional Handling

File Handling

Java Applets

Java DataBase Connectivity

Page Stats

Visitor: 296

Java Jumping Statement

Jumping statements are used to pass the control to the beginning or end of the program block

Types of Jumping Statements are:

  1. Break
  2. Continue
  3. Return

Break

Break is mostly use inside a loop. It will terminate a loop in between the execution.

Continue

Continue statement is use to skip the statements but control remain in execution.

Return

Return is mostly used to return the control back to the function call. It can return with or without value.

Labeled loop

Loop1: for (i=1; i<=10; i++)
{
    Loop2: for (j=1; j<=10; j++)
    {
        System.out.println("hello");
        if (j==5)
            break loop1;
    }
}
hello 4 times.
Updated: 24-Mar-20