Core Java Programming Challenges #25 | Coding Challenges | Naresh IT

preview_player
Показать описание
Core Java Programming Challenges #25 | Coding Challenges | Naresh IT

💡 Also Watch

Java Programming Tutorials by Mr.Hari krishna:
Advanced Java Programming Tutorials by Mr.Nataraj:

Subscribe to our channel and hit the bell 🔔🔔🔔 icon to get video updates.

💡 Visit Our Websites
#CoreJava_Programing #Challenges #CoreJava #Quiz
--------------------------

💡 About NareshIT:

"Naresh IT is having 14+ years of experience in software training industry and the best Software Training Institute for online training, classroom training, weekend training, corporate training of Hadoop, Salesforce, AWS, DevOps, Spark, Data Science, Python, Tableau, RPA , Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in USA, Hyderabad, Chennai and Vijayawada, Bangalore India which provides online training across all the locations

--------------------------

💡 Our Online Training Features:
🎈 Training with Real-Time Experts
🎈 Industry Specific Scenario’s
🎈 Flexible Timings
🎈 Soft Copy of Material
🎈 Share Videos of each and every session.

--------------------------

💡 Please write back to us at

--------------------------

💡 Check The Below Links

Рекомендации по теме
Комментарии
Автор

public class Test {
public static void main(String[] args){
int[] arr = {4, 2, 1, 1, 2, 3, 4};
Set<Integer> set = new HashSet<>();
for(int i = 0; i<arr.length; i++){
if(!set.contains(arr[i])){
set.add(arr[i]);
}
else{
set.remove(arr[i]);
}
}
System.out.println("Unique Element is: " + set);
}
}

MaulikSakhida
Автор

public class Challenge23 {

public static void main(String[] args) {
int[] arr = {1, 1, 2, 2, 3, 6, 3, 4, 4, 5, 5};
int value = 0;
int count=0;
for(int i =0;i<arr.length;i++)
{

for(int j = 0;j<arr.length;j++)
{
if(arr[i]==arr[j] && i !=j)
{

}

}
if(count==0)
{
value = arr[i];
}
count = 0;
}
System.out.println(value);
}

}

SunilKumarSunil
Автор

public class Chall
enge25 {
public static void main(String[] args) {
int arr[]=new int[]{1, 1, 2, 2, 3, 4, 4, 5, 5};
for (int i=0;i< arr.length;i++){
boolean isUnique=true;
for(int j=0;j< arr.length;j++){
if(i!=j && arr[i]==arr[j]){
isUnique=false;
break;
}

}
if(isUnique)
System.out.println(arr[i]);

}
}
}

mdadilraza
Автор

public class Test{

public static void main(String[] args)
{
int[] arr={1, 2, 3, 4, 5, 4, 3, 2, 1};

for(int i=0;i<arr.length;i++)
{boolean isDuplicated=false;
for(int j=0;j<arr.length;j++)
{
if(i!=j && arr[i]==arr[j])
{ isDuplicated=true;

}

}

if(!isDuplicated)
{

}
}


}
}

PankajDeulkar-gs
Автор

public static void main(String[] args) {
int []arr = {1, 1, 2, 3, 4, 5, 2, 3, 4, 5, 9};
for(int i = 0; i<arr.length; i++) {
int dup=0;
for(int j = 0; j<arr.length; j++) {
if(arr[i]==arr[j]) {

}
}
if(dup==1) {

break;
}
}

}

ksvijayan
welcome to shbcf.ru