Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
compile java online
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//Title of this code //'main' method must be in a class 'Rextester'. import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int i=0; int j=0; boolean broken = false; for (i = 0; i < 10 && !broken; i++) { broken = false; for (j = 10; j > 0 && !broken; j--) { if (j == i) { broken = true; System.out.println("loop breaks when i==j=="+i); } } } System.out.println(i); System.out.println(j); } }
[
+
]
Show input
Compilation time: 0.66 sec, absolute running time: 0.14 sec, cpu time: 0.08 sec, memory peak: 14 Mb, absolute service time: 0.81 sec
edit mode
|
history
loop breaks when i==j==1 2 0