P49 - Assignment on List Interface in Java | Collections | Core Java | Java Programming |
HTML-код
- Опубликовано: 4 окт 2024
- In this video, I have explained about "Assignment on List Interface in Java".
🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶🔶
▶ Next Video link: • P50 - Map in Java | Co...
◀ Previous Video Link: • P48 - LinkedList in Ja...
↔ Core Java in Telugu Playlist link: bit.ly/3KMlbBk
✴ Checkout my other playlists: bit.ly/3gLIAVL
☕ Buy me a coffee: bit.ly/33ljBWc
===================================
===================================
Connect me @
🔗 Website - www.hyrtutoria...
🔗 Telegram - t.me/hyrtutorials
🔗 Facebook - / hyrtutorials
🔗 LinkedIn - / hyrtutorials
🔗 Twitter - / hyrtutorials
🔗 Instagram - / hyrtutorials
===================================
===================================
🙏 Please Subscribe🔔 to start learning for FREE now, also help your friends in learning the best by suggesting this channel.
#hyrtutorialstelugu #selenium #java #telugu
Java programming by Yadagiri Reddy
↔ Core Java in Telugu Playlist link: bit.ly/3KMlbBk
✴ Checkout my other playlists: bit.ly/3gLIAVL
☕ Buy me a coffee: bit.ly/33ljBWc
AT LAST I AM LEARNING JAVA IN MY MOTHER TONGUE, WHICH IS GIVING GOOD CLARIFICATION TOO💕💕
THANK YOU VERY MUCH SIR
Thanks buddy 🤩
Anna Thank You for crystal clear explanation of Java
Happy Learning buddy 🙂
I love the way you teach. Please make a videos of DSA too.
Thanks buddy 😊
/*Write a program print the sum of the even numbers in a list
Input:{4,5,0,9,8,10} Output:22*/
package ListInterfaceassignments;
import java.util.LinkedList;
public class Program2
{
public static void main(String[] args)
{
LinkedListll=new LinkedList();
ll.add(4);
ll.add(5);
ll.add(0);
ll.add(9);
ll.add(8);
ll.add(10);
System.out.println("Input:"+ll);
int sum=0;
for(int i=0;i
anitha i am also wrote program and posted comment list please see once is it correct or not (way of writing program) .but output is came .
Good buddy
Please make video on this topic I just want to know how to approach.
your way of approaching baguntundi so use ful avutundi chala rojulu nunchi wait chestunna please make as soon as possible
Yeah chusta buddy
Hi sir,
Hope you're doing well,
I got into a confusion in 11 question "Program to delete the elements of list1 from list2?"
Sir, do you want us to remove everysingle occurrence of the single element of list1 from list2? or do you want us remove single occurrence of the list1 elements from the list2?
Hi..bro
Collections ki notes prepare chesi istanu ani chepparu....
So...plz provide Collections notes as soon as possible...I'm waiting eagerly
Sure buddy
Just don't wait. Watch those videos again.
The best teacher ever❤
Thanks buddy 😊
Waiting for next video anna. In java✨❤
May be next year he buddy inka
@@HYRTutorialsTelugu 👍❤
nice explanation
Thanks buddy 😊
ok sir homwork chestanu and thankyou sir
Happy Learning buddy 🙂
Thankyou sir
Happy Learning buddy 🙂
Thank you sir you are a good teacher please make a videos of advanced java also sir it will help full us.
Thanks buddy 🙂
P4:
list split : list -> list1 & list2
list merge: list1 + list2 => list3
=====================================
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class P01SumAndAverage {
public static void main(String[] args) {
//List list = Arrays.asList(new Integer[] {4, 5, 0, 9, 8, 10});
List list = Arrays.asList(4, 5, 0, 9, 8, 10);
List list1 = new ArrayList();
List list2 = new ArrayList();
for(int i = 0; i < list.size(); i++) {
if(i
Good buddy
Tq sir tq very much
Happy learning buddy 😊
Super explanation bro
Thanks buddy 😊
sir why don't you upload these question answers?
because i am preparing for my company drive and i learned all the videous in two days
Only videos chusthe use undadu buddy. You should practice all the assignments given
Superb sir
Thanks buddy 😊
Sir make videos on advance java too
No plan buddy
SUPER REDDY
Thanks buddy 😊
Very nice videos sir. When is the next video sir eagerly waiting.
Thanks buddy 😊
Super sir thanks
Thanks buddy 😊
Thank you bro wait for next videos for collection set and map
Today at 10am buddy
Waiting for next vedio buddy
Today at 10am buddy
very good sir
Thanks buddy 😊
Tqs anna
Happy learning buddy 😊
Program 6:
package list;
import java.util.ArrayList;
import java.util.Arrays;
public class HighestDuplicate {
public static void main(String[] args) {
// TODO Auto-generated method stub
int mostRepeated = 0 , percount=0;
ArrayList al = new ArrayList(Arrays.asList(4,1,9,4,8,0,5,8,1,8,6));
for(int i=0 ; i
memu try chestamu sir but meru kuda vaka video chestey better sir because meru chesedi different way lo chestaru sir i hope merku ardam ayindi anukunta
Chuddam buddy
Nice
Thanks buddy 😊
Please guys like and comment
🙏
Hii sir please make a video on applets topic
No plan buddy
Sir videos fast ga cheyandi waiting your videos daily
I'm trying my best buddy
Sir.. math functions gurinchi oka video chayandi
Already starting lo oka assignment ichanu buddy danai meeda
Anna Mee classes follow ayithey chala ledante course emaina buy cheyala
Classes follow ithe Chalu buddy.
Appatiki nee meeda neeku confidence raakapothe then go for courses
Nainu courses complete chesi ee sir videos chustunna ....ikkade chala baga artham avutundi ...ee classes ni complete ga vinte chalu bro ....courses lo intha clear ga chepparu ...it's my suggestion ...😊😊
topic understood sir.
Thanks buddy 🙂
HAPPY TEACHERS DAY SIR
Thanks buddy 🙂
sir set and queue videos upload cheyyandi....pls
Coming soon buddy
Em annaa chala rojuluu. Nunchi. Classes. Cheppaledaaaa
Busy schedule buddy
Nice bro
Thanks buddy 🙂
bro 19 and 20 questions clear gaa explain cheyandi .naku entha try chesina logic ela rayalo teliyadam ledu, idea raldu please please bro
Try to watch the video one more time. That assignment part alone
Tqq u Anna❤️🥰❤️
Happy learning buddy 😊
Bro third assignment okkasari explain chesthara
Ee assignment solutions video tvaralone chesta buddy
Thank you sir, sir chala gap icharu core java meeda inka vedios chestaara lekapothe ayipoyaaya edaina update ivvandi sir.
Inka unnai buddy but bcz of busy schedule epudu chestano nake clarity ledu
@@HYRTutorialsTelugu Ok sir wait chestam
Sir 11th question lo elements ni ae manner lo delete chesaru sir. Ante ipudu input 1 lo 4 undi so input 2 lo all occurences of 4 ni delete chesaru kaani input 1 lo 8 undi so input 2 lo 8 only 1 time ae delete chesaru???
institute vellakunda mi vedios matrame follow avuthunna sir remaining vedios kosam waiting sir
Super buddy
Institute avasaram em ledu buddy
Remaining videos upload chayandi sir..
Today at 10am buddy
@@HYRTutorialsTelugu thank you sir..
Sir JDBC gurichi video cheyyuchu kada
Chuddam buddy
Assignment on List interface Programes video upload cheyandi bro
Adi meere solve cheyyali buddy
sir lifecycle of thread gurinchi chepandi sir...
Sure buddy
bro once give much more clarity on this program because iam very curious on this type programs
Soon will make a video buddy
advance java kuda cheppandi bro @@HYRTutorialsTelugu
No time buddy@@onepieceUniverse871
Solutions with my level best.
These questions are awesome. I have experienced similar type of questions in interview. If I could have found these questions earlier I could have done well. Any how I learned not to repeat mistakes and learning more.
//Sum and Avg
public static void main(String[] args) {
LinkedList list = new LinkedList();
list.add(4);
list.add(5);
list.add(0);
list.add(9);
list.add(8);
list.add(10);
int sum = 0;
for (int i = 0; i < list.size(); i++) {
sum = sum + list.get(i);
}
int Avg = sum/list.size();
System.out.println(sum);
System.out.println(list);
System.out.println(sum+" "+Avg);
}
//Sum of even
public static void main(String[] args) {
LinkedList list = new LinkedList();
list.add(4);
list.add(5);
list.add(0);
list.add(9);
list.add(8);
list.add(10);
int sum = 0;
for (int i = 0; i < list.size(); i++) {
if (list.get(i) % 2 == 0){
sum = sum + list.get(i);
}
}
System.out.println(sum);
}
//Split Array {4,9,8,5,0,10}
public static void main(String[] args) {
LinkedList list = new LinkedList();
list.add(4);
list.add(9);
list.add(8);
list.add(5);
list.add(0);
list.add(10);
LinkedList list1 = new LinkedList();
LinkedList list2 = new LinkedList();
int m = list.size()/2;
for (int i = 0; i < m; i++) {
list1.add(list.get(i));
}
for (int i = m; i < list.size(); i++) {
list2.add(list.get(i));
}
System.out.println(list1);
System.out.println(list2);
}
//Merge {4,9,8} {5,0,10}
public static void main(String[] args) {
LinkedList list1 = new LinkedList();
LinkedList list2 = new LinkedList();
LinkedList flist = list1;
list1.add(4);
list1.add(9);
list1.add(8);
list2.add(5);
list2.add(0);
list2.add(10);
for (int i = 0; i < list2.size(); i++) {
list1.add(list2.get(i));
}
System.out.println(flist);
}
//Highest Duplicate element
public static void main(String[] args) {
int maxcount = 0;
int maxelement = 0;
for (int i = 0; i < numbers.size(); i++) {
Integer num = numbers.get(i);
int count = 0;
for (int j = 0; j < numbers.size(); j++) {
Integer n = numbers.get(j);
if(n.equals(num)){
count++;
}
}
if (count>maxcount){
maxcount = count;
maxelement = num;
}
}
System.out.println("Max element"+ " " + maxelement );
System.out.println("Max count" +" "+ maxcount);
}
WAP TO DELETE THE DUPLICATE ELEMENTS
public static void main(String[] args) {
ArrayList numbers = new ArrayList();
numbers.add(4);
numbers.add(1);
numbers.add(9);
numbers.add(4);
numbers.add(8);
numbers.add(0);
numbers.add(5);
numbers.add(1);
numbers.add(8);
numbers.add(6);
int Size = numbers.size();
for (int i = 0; i < Size ; i++) {
Integer Initial = numbers.get(i);
for (int j = i+1; j < Size; j++) {
Integer Check = numbers.get(j);
if (Initial.equals(Check)){
numbers.removeAll(Collections.singleton(Initial));
Size = numbers.size();
j--;
i--;
}
}
}
System.out.println(numbers);
}
//Print Duplicate list
LinkedList list1 = new LinkedList();
list1.add(4);
list1.add(9);
list1.add(8);
list1.add(5);
LinkedList list2 = new LinkedList();
list2.add(1);
list2.add(8);
list2.add(0);
list2.add(5);
list2.add(1);
list2.add(6);
LinkedList clist = new LinkedList();
for (int i = 0; i < list1.size(); i++) {
for (int j = 0; j < list2.size(); j++) {
if(list1.get(i) == list2.get(j)){
clist.add(list1.get(i));
}
}
}
System.out.println(clist);
//List of prime number
LinkedList prime = new LinkedList();
int n = 50;
for (int i = 2; i
Bro share remaining problems as well
@@saipradeep01 ok sure
Good buddy
assenment video cheyandi sir
Sure buddy
@@HYRTutorialsTelugu Please 🥺🙏
sir 12 th output wrong, index starts reading from 0 on words.
letme check
If anyone have done all the problems please provide solutions for it so that the people who didn't get some solutions may refer to ur solutions ..
Yes guys, help each other
are u got solutions
anna Adv.java videos chayyava plz
No plan buddy 😔
Brother meru spring boot and spring batch gurinchi kuda cheptara ?
No plan buddy 😔
bro Why cant you do a series in advanced java
great series bro thank you for sharing the knowledge
please do a series on advanced java bro
It takes a lot of time buddy and I don't have that much time.
Bro 11th question lo answer {1,0,5,1,6} but miru output lo {1,8,0,5,1,6} idi undi bro
Nice explain bróø👌
Thanks buddy 😊
waiting for set list videos
Yeah buddy chestanu
tqqq bro
keep learning buddy
Thanks sir 🥰, And how many videos are left for Java sir
Happy Learning buddy 🙂
/*Write a program to print the sum&average of the elements present in list
Input:{4,5,0,9,8,10} output;sum-36&average-6*/
package ListInterfaceassignments;
import java.util.LinkedList;
public class Program1
{
public static void main(String[] args)
{
LinkedList ll=new LinkedList();
ll.add(4);
ll.add(5);
ll.add(0);
ll.add(9);
ll.add(8);
ll.add(10);
System.out.println("Input:"+ll);
int sum=0;
for(int i=0;i
Good buddy
Bro 3rd and 4th question ki arrays use cheyala Leda collection use cheyala?
Collections he use cheyyali buddy
please remaining videos upload chayandi sir.... We are eagerly waiting to look forward...
Sure buddy
program 7 :
package list;
import java.util.ArrayList;
import java.util.Arrays;
public class DeleteDuplecates {
public ArrayList removeDuplecates( ArrayList al ){
ArrayList temAl = new ArrayList();
for(int i=0 ; i
waiting for next video bro
Today at 10am buddy
sir when you are going to upload the next vedio, plz reply
Today at 10am buddy
public static void main(String[] args) {
//to find the highest duplicate value.
Vectorinput =new Vector();
input.add(4);
input.add(1);
input.add(9);
input.add(4);
input.add(8);
input.add(0);
input.add(5);
input.add(1);
input.add(8);
input.add(6);
MapfrequencyMap = new HashMap();
for (Integer number:input) {
frequencyMap.put(number, frequencyMap.getOrDefault(number,0)+1);
}
int maxfrequence=Collections.max(frequencyMap.values());
int maxDuplicate=0;
for(Map.Entry entry:frequencyMap.entrySet()) {
if(entry.getValue()==maxfrequence) {
maxDuplicate=entry.getKey();
}
}
System.out.println("The Highest Value is "+maxDuplicate);
}
}
1)
package patternsprog;
import java.util.ArrayList;
import java.util.List;
public class oneprog {
public static void main(String[] args) {
int a[] = { 4, 5, 0, 9, 8, 10 };
int sum = 0;
int avg = 0;
for (int i = 0; i < a.length; i++) {
sum = sum + a[i];
}
avg = sum / a.length;
System.out.println("sum is" + sum);
System.out.println(avg);
}
}
2)
package patternsprog;
import java.util.ArrayList;
import java.util.List;
public class oneprog {
public static void main(String[] args) {
int a[] = { 4, 5, 0, 9, 8, 10 };
int sum = 0;
ArrayList al = new ArrayList();
for (int i = 0; i < a.length; i++) {
if (a[i] % 2 == 0) {
al.add(a[i]);
sum = sum + a[i];
}
}
System.out.println(sum);
}
}
3)
package patternsprog;
import java.util.ArrayList;
import java.util.List;
public class oneprog {
public static void main(String[] args) {
int a[] = { 4, 9, 8, 5, 0, 10 };
int size = a.length / 2;
ArrayList l1 = new ArrayList();
ArrayList l2 = new ArrayList();
for (int i = 0; i < size; i++) {
l1.add(a[i]);
}
for (int i = size; i < a.length; i++) {
l2.add(a[i]);
}
System.out.println(l1);
System.out.println(l2);
}
}
4)
package patternsprog;
import java.util.ArrayList;
import java.util.List;
public class oneprog {
public static void main(String[] args) {
int a[] = { 4, 9, 8 };
int b[] = { 5, 0, 10 };
ArrayList al = new ArrayList();
for (int i = 0; i < a.length; i++) {
al.add(a[i]);
}
for (int i = 0; i < b.length; i++) {
al.add(b[i]);
}
System.out.println(al);
}
}
5)
package patternsprog;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class oneprog {
public static void main(String[] args) {
String s[]= {"baby","ball","soap","baby","shampoo","chalk","soap","makeup","baby","lotion"};
ArrayList al=new ArrayList();
for(int i=0;i
Good buddy
can you please tell when next video will be released ?
Not able to sit in front of the system bcz of work buddy
@@HYRTutorialsTelugu sir please do videos asap we're eagerly waiting for your lectures.
Your way of explanation is soooo clear and easy to understand.
Even paid teachers are not even 30 to 40% of your level.
@@Mohankumar-px6lt thank you so much buddy
😍😍😍
Thanks buddy 🙂
Sir i had solved all the questions and i uploaded all my answers in my github. But iam unable to post the link in the comments section.
Why buddy? you can also send me on hyadagirireddytutorials@gmail.com
Bro send me answers pdf bro
@@ajaychalla800 pdf emi prepare cheyyaledu buddy
Bro 19 question ardam kale koncham clarity istara
Adi initial ga confusing ga untadi but try to watch that part few times buddy. Or search for balanced expression problem in Google and you will get so many results. Don't look at the answers but try to understand the problem and solve it on your own buddy
Please share all this questions in pdf format sir
Pause the video and take a screenshot buddy
MultiThreading cheppandi sir
Sure buddy
16,17 map use cheyala brother?
No buddy
Program 5 :
package list;
import java.util.ArrayList;
import java.util.Arrays;
public class RepeatedElements {
public static void main(String[] args) {
// TODO Auto-generated method stub
String s[] = {"baby" , "ball" , "soap" , "baby" , "shampoo" , "chalk" , "soap" , "makeup" , "baby" , "lotion"};
ArrayList al = new ArrayList(Arrays.asList(s));
ArrayList copy = new ArrayList();
for(int i=0 ; i
i want the remaing
Map video release avthundi buddy ivala
sir meeru okkasari project medha video cheiyandi
Just corejava tho I can't explain the realtime projects buddy
Bro ee assignment questions meda cheyandi bro next class konni solve cheyalekpoya pls☹️
Ha chusta buddy
Bro I done all problems if you want ping me
@@MyLove-zc1xu Good buddy
@@HYRTutorialsTelugu brother nenu chesina problems meku mail cheyana.. mistakes vunte cheppandi bro
@@MyLove-zc1xu hai bro send me
Hi bro
Hi buddy
Conditional statements, loop statements practice questions evvagalara sir
Aa videos lo already ichanu buddy
Sir when will be the next video sir
Today at 10am buddy
sir please share 19th assignment code it's some what difficult
Yeah buddy tvaralo solutions video chestanu
@@HYRTutorialsTelugu thank so much sir ❤️
sir mi explanation varu miru echa assignment varu sir its very tough
Thats how you learn buddy
send me single and dubule liked list progam plse sir...
havent created anything specifically on those things buddy
3 assignment answers link pettandi
Inka cheyyaledu buddy video
package ListAssignments;
import java.util.*;
public class Practies{
public static void main(String[] args) {
ArrayList numbers = new ArrayList();
numbers.add(4);
numbers.add(5);
numbers.add(0);
numbers.add(9);
numbers.add(8);
numbers.add(10);
int sum = 0;
for (int num : numbers) {
sum += num;
}
double average = (double) sum / numbers.size();
System.out.println("Sum: " + sum);
System.out.println("Average: " + average);
}
}
Good buddy
Sir please provide answers for these so that we'll refer it
Sure buddy
Q1:
package ass.list;
import java.util.ArrayList;
import java.util.Scanner;
public class SumAnndAverage {
public static void main(String[] args) {
ArrayList al=new ArrayList(5);
Scanner sc=new Scanner(System.in);
System.out.println("enter numbers ot add");
int size = 0;
if(al.size()==0) {
size=al.size()+1;
}
for(int i=0;i
Good buddy
i unable to code 18 th and 19 th questions .. plz anyone help me
Soon will upload the solutions video buddy
@@HYRTutorialsTelugu tq bro.. but avi ela cheyali ani alochisthu avi solve chesedhaaka normal gha undanu bro avey think chesthu unta.. plz give some some suggestions to how to do that..
@@ganeshkatherapaka1719 nuvvu em em chesav and ekkada struck ayyavo chepthe I will unblock you buddy. Video lo problem enti anedi explain chesanu. So one more time adi vini, code start chei buddy. Start chesaka ninnu em aaputhondi anedi chepthe nenu chepthanu buddy
@@HYRTutorialsTelugu in 18 th question after adding the list employees with name salary and country . after that how will i get the names by country bro.. what conditions i have to write
@@ganeshkatherapaka1719 You have iterate and identify the countries then store them into a collection. Then iterate that collection and verify which list has that country and print the names
Anna assignment video pettandi anna
Check the description buddy
6th problem code
public class HighestNoOfDuplicates {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
Integer[] arr = new Integer[n];
for(int i=0; is) {
s=count;
variable =i;
}
}
System.out.println(variable+" is maximum of "+s+ " times");
}
}
sir scanner class use chesi cheyala
sir please reply evvandi
Use chesthe better buddy
Git Hub gurinchi oka video chey buddy
Sure buddy
import java.util.*;
public class MyClass {
public static void main(String args[]) {
int sum=0;
ArrayList l1=new ArrayList();
l1.add(4);
l1.add(5);
l1.add(0);
l1.add(9);
l1.add(8);
l1.add(10);
int count =0;
for(int i=0;i
Correct buddy
2.package main;
import java.util.*;
public class practice {
public static void main(String[] args) {
List l1=new LinkedList();
l1.add(4);
l1.add(5);
l1.add(0);
l1.add(9);
l1.add(8);
l1.add(10);
int sum=0;
for(int i=0;i
Good buddy