Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Switch
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
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' //Switch class Rextester { public static void main(String[] args) { int stationary = 3; // choose case item number switch (stationary) { case 1: System.out.println("Pens"); break; case 2: System.out.println("Pencils"); break; case 3: System.out.println("Paper"); break; case 4: System.out.println("Rulers"); break; case 5: System.out.println("Calculators"); break; case 6: System.out.println("Erasers"); break; case 7: System.out.println("Highlighters"); break; } } }
[
+
]
Show input
Compilation time: 0.72 sec, absolute running time: 0.2 sec, cpu time: 0.12 sec, memory peak: 34 Mb, absolute service time: 1,14 sec
edit mode
|
history
|
discussion
Paper