Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Find out duplicate number between 1 to n numbers in java

public class Main{ public static void main(String[] args){ int [] arr = new int [] {10,34,56,67,10,56,3}; System.out.println("Duplicate elements are "); for(int i = 0; i < arr.length; i++) { for(int j = i + 1; j < arr.length; j++) { if(arr[i] == arr[j]) System.out.println(arr[j]); } } } } 
Comment

PREVIOUS NEXT
Code Example
Java :: double if statement java 
Java :: how to upload image from android app to server 
Java :: new in t arrray java 
Java :: maths.random in Java 
Java :: localbroadcastmanager android example 
Java :: Could not resolve project :app 
Java :: what is a package in java 
Java :: firebase realtime database get key 
Java :: swapping two numbers using third variable 
Java :: how to create a node in java 
Java :: java developer interview questions 
Java :: java store data 
Java :: FlutterFirebaseCorePlugin.java uses or overrides a deprecated API. 
Java :: call by value and call by reference in java 
Java :: java integer object to char 
Java :: limit decimals java 
Java :: Java How to use Deque? 
Java :: get ocurrences in array java 
Java :: terminate function calling in java 
Java :: stream reduce 
Java :: array to array list java 
Java :: java draw image 
Java :: private method in interface java 
Java :: interface declaration in java 
Java :: what is deserialization in java 
Java :: java to python 
Java :: if else bedingungen java 
Java :: java import keyword 
Java :: labeled break Statement Java 
Java :: Transversal operation in java array 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =