Category: Uncategorized
Difference between Vector and Arraylist in Java
In Java ArrayList and Vector classes both are implements List Interface, and both are using resizable and growable Array for internal data structure. Differences with respect to : Methods: Thread Safety: Performance: Legacy: Increment Size:
Transform Your Website into an App in Minutes with AppGenerater: A No-Code Solution
In today’s fast-paced digital world, having a mobile app for your website is crucial for reaching a wider audience and enhancing user engagement. However, the process of creating an app can be perceived as a complex and expensive endeavor, especially …
Transform Your Website into an App in Minutes with AppGenerater: A No-Code Solution Read more »
Who is Nuage Laboratoire and strange email id xyz………@cloudtestlabaccounts.com after published Android app in play store
“Nuage Laboratoire, when translated, reveals its meaning as ‘Cloud Lab,’ while ‘Test Lab’ can be equivalently expressed as ‘Laboratoire Test.’“ If you’ve ever navigated the intricate world of app testing, chances are you’ve encountered the powerhouse known as Firebase Test …
Q. How to Create Map Object ? Create Map Object put some element on it and iterate one by one .
SOLUTION :- package p2; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; public class MapExample { public static void main(String[] args) { Map<Integer,String> map =new HashMap<>(); map.put(1, “David”); map.put(2, “Moksa”); map.put(3, “Poll”); map.put(4, “Iliana”); for(Entry<Integer, String> v1:map.entrySet()) { System.out.println(v1.getKey()+””+v1.getValue()); } } } …
Q. How to find Sum of Odd and even number using stream.
SOLUTION:- import java.util.Arrays;import java.util.List; public class SumOfOddAndEven { public static void main(String[] args) { Integer[] number= {1,2,3,4,5,6,7,8,9,10}; List<Integer> list=Arrays.asList(number); // Even Nomber int sumOfEven=list.stream().filter(i->i%2==0).mapToInt(i->i).sum(); System.out.println(“Sum of Even numbers:”+sumOfEven); // Odd Number int sumOfOdd=list.stream().filter(i->i%2!=0).mapToInt(i->i).sum(); System.out.println(“Sum of Odd numbers:”+sumOfOdd); }}