Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Coding Numbers - Duplicate - Array
//[Java]Coding Numbers - Duplicate - Array // // //Title of this code //'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_72 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int[] numbers={12,3,4,55,32,76,23,34,22,22,76}; Arrays.sort(numbers); for(int i=1;i<numbers.length;i++) { if(numbers[i]== numbers[i-1]) System.out.println("Duplicate: "+numbers[i]); } //System.out.println("Hello, World!"); } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
JAVA # Karekök Hesaplama
[a-zA-Z ]{0,12}
piglatin
Nick-test
Car Sensors
cosmology
formuły
switching light bulbs
Memory cleanup
LunarLanding.java
Please log in to post a comment.