Java Hyd Team
We have 10 days to be prepared for next drive if all will be consistent for next 10 days we can give good response in upcoming interviews n paper's if you want us to support you with notes / gmeet for each topic daily for next 10 days do comment else leaveβ¦
I will do everything who will be committed for next 10 days after this i will del this channel n already i have restricted content copy ar saving so you can't do
public class SortAsc {
public static void main(String[] args) {
//Initialize array
int [] arr = new int [] {5, 2, 8, 7, 1};
int temp = 0;
//Displaying elements of original array
System.out.println("Elements of original array: ");
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i] + " ");
}
//Sort the array in ascending order
for (int i = 0; i < arr.length; i++) {
for (int j = i+1; j < arr.length; j++) {
if(arr[i] > arr[j]) {
temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
}
}
System.out.println();
//Displaying elements of array after sorting
System.out.println("Elements of array sorted in ascending order: ");
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i] + " ");
}
}
}
public static void main(String[] args) {
//Initialize array
int [] arr = new int [] {5, 2, 8, 7, 1};
int temp = 0;
//Displaying elements of original array
System.out.println("Elements of original array: ");
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i] + " ");
}
//Sort the array in ascending order
for (int i = 0; i < arr.length; i++) {
for (int j = i+1; j < arr.length; j++) {
if(arr[i] > arr[j]) {
temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
}
}
System.out.println();
//Displaying elements of array after sorting
System.out.println("Elements of array sorted in ascending order: ");
for (int i = 0; i < arr.length; i++) {
System.out.print(arr[i] + " ");
}
}
}
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