import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Set;
class Main {
public static void main(String[] args) {
// create an arraylist from the array
// using asList() method of the Arrays class
ArrayList<Integer> numbers = new ArrayList<>(Arrays.asList(10,20,30,10,40,20,30,40,50));
System.out.println("ArrayList with duplicate elements: " + numbers);
// convert the arraylist into a set
Set<Integer> set = new LinkedHashSet<>();
set.addAll(numbers);
// delete al elements of arraylist
numbers.clear();
// add element from set to arraylist
numbers.addAll(set);
System.out.println("ArrayList without duplicate elements: " + numbers);
}
}
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Set;
class Main {
public static void main(String[] args) {
// create an arraylist from the array
// using asList() method of the Arrays class
ArrayList<Integer> numbers = new ArrayList<>(Arrays.asList(10,20,30,10,40,20,30,40,50));
System.out.println("ArrayList with duplicate elements: " + numbers);
// convert the arraylist into a set
Set<Integer> set = new LinkedHashSet<>();
set.addAll(numbers);
// delete al elements of arraylist
numbers.clear();
// add element from set to arraylist
numbers.addAll(set);
System.out.println("ArrayList without duplicate elements: " + numbers);
}
}
I hope you guy's enjoyed last day tests game another set of questions getting updated in game for today combination of forloop n if conditions
Anonymous Poll
100%
Yes
0%
No
I will send the Google meet link 🖇️ at 8:50 get ready after that from 9:15 we will start session we will cover all questions and answers possible to be asked by interviewer
Java Hyd Team
I hope you guy's enjoyed last day tests game another set of questions getting updated in game for today combination of forloop n if conditions
These 7 Set people please ping me @stockkida we will only share Link to you guy's
Soon we will make this channel private n will remove inactive members from channel
Java Hyd Team
New high 😁😁😁
What it takes to make high scores in coding
Nothing a good understanding of concepts that's it we will work on your concepts for that you have to give us ur 20% atleast
Nothing a good understanding of concepts that's it we will work on your concepts for that you have to give us ur 20% atleast
This media is not supported in your browser
VIEW IN TELEGRAM
Yahan Mai pighal gaya
https://meet.google.com/vho-ikdc-zrs?hl=en-GB Join using this link for google meet we will send game link also by 9:15pm Ist
Google
Real-time meetings by Google. Using your browser, share your video, desktop, and presentations with teammates and customers.