Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
apple1
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String[]args){ int apple=25,mango=50,grapes=100; int amount=25; if(amount==mango) System.out.println("mango not collected"); else if(amount==apple){ System.out.println("Apple collected"); } else if(amount==mango){ System.out.println("Mango collected"); } else if(amount==grapes){ System.out.println("Grapes collected"); } else{ System.out.println("Invalid"); } } }
run
|
edit
|
history
|
help
0
Sorting array
regex with %
Print out perfect numbers 0 – 10,000
1.6
1.5
Compare three ways to clear a String in java
Kadane's Algorithm
project euler 12, java
Problem: fb_series
1*2-3+4