Java Collections Tutorial

  Рет қаралды 167,007

Programming with Mosh

Programming with Mosh

2 жыл бұрын

Learn all about Java Collections and write Java code with confidence!
🔥 Want to master Java? Get my complete Java mastery bundle: bit.ly/2tKoy8C
👍 Subscribe for more Java tutorials like this: goo.gl/6PYaGF
📕 Get my FREE #Java cheat sheet: bit.ly/2JNlQnw
⭐️ Want to learn more from me? Check out these links:
Courses: codewithmosh.com
Twitter: / moshhamedani
Facebook: / programmingwithmosh
Blog: programmingwithmosh.com
#Java #Programming

Пікірлер: 100
@nicolai9595
@nicolai9595 2 жыл бұрын
Somehow you manage to make videos that fit just along side my curriculum of coding for beginners in my computer science degree. Really nicely explained, and helps me grasp the concept better! Thanks Mosh
@orisit9038
@orisit9038 2 жыл бұрын
Hi Mosh, Thank you for all the tutorials especially C#, i just finished your whole course on MVC 5. Please make also a Course on WPF C#, you have the best teaching method and style here in YT, so clear and precise and whats great is it is for real world scenarios as i just got hired as a 'no experience' developer and these tutorials helped me a lot. Thanks again and God Bless you and your family. 🙏
@insighted6856
@insighted6856 2 жыл бұрын
This is exactly what I needed to learn next! Thanks so much Mosh! 😁
@MrCrackheadst
@MrCrackheadst Жыл бұрын
I started the video asking myself why i couldnt use the for each with the genericList. i start stackoverflowding not getting a good answer. little did i know the whole purpose of the video was explaning exactly that 🤣. Your way of teaching is very intuitive. i usually use your videos to understand and then complement with books once i do understand to get the intricacies of each topic.
@svetlanamazhaykina6918
@svetlanamazhaykina6918 3 ай бұрын
Thanks for your work, Mosh! Well done!
@longkesh1971
@longkesh1971 Жыл бұрын
Thank you for making this video. Your examples are clear and easy to understand.
@TecICTian
@TecICTian 2 жыл бұрын
A great flow and good explanation to understand the lesson clearly...
@steinbeats
@steinbeats 2 жыл бұрын
Be blessed Mosh Plus everyone else learning code through Mosh
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@johaneluttig9311
@johaneluttig9311 2 жыл бұрын
Our curriculum is purely based on Delphi... I have learned a lot from all of your other videos for hobbies and now I know who to ask when I really need help! knowing that our country's public schools (and I believe most other schools) has a but of a struggle when it comes to teaching these kinds of things, would you be able to help us; at least with the basics?
@aces8481
@aces8481 2 жыл бұрын
uncanny timing - badly needed this one and couldn't have come from a better teacher :)
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️
@mohanbabu.d
@mohanbabu.d 2 жыл бұрын
Thank you mosh Ur Videos are good 👍
@leqalcoding1066
@leqalcoding1066 2 жыл бұрын
I've learnt more than alot from your videos please!! can you do a video on Open3d python?!🙏🙏🙏🙏
@PwrDanger
@PwrDanger 2 жыл бұрын
You are absolutely very good teacher and programmmer.
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@dembro27
@dembro27 2 жыл бұрын
I'm learning and using Java 8, but I wish I had that var keyword!! Nice video, thanks.
@umairnaveed2075
@umairnaveed2075 2 жыл бұрын
Sir kindly make a video that complete react js course in latest version like functional components
@mangodragonfruitlemonade
@mangodragonfruitlemonade 2 жыл бұрын
Mosh you are great guy whic macbook you use
@alirezavalikhani7232
@alirezavalikhani7232 2 жыл бұрын
That was great.داداش دمت گرم
@anu8590
@anu8590 Жыл бұрын
enjoy java with mosh☕
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️
@darren15
@darren15 Жыл бұрын
Why would I use "collection collection = new ArrayList()" when I could use the class that implement the collections like "ArrayList alist= new ArrayList(); " ? Would benefit does it provide to use the collection? I guess I missed it in the video. LOL
@jesiotra6246
@jesiotra6246 Жыл бұрын
ich bought a mastery course , but i can't find it in it. Could you say in with part and time exactly it is?
@azaih
@azaih Жыл бұрын
Excellent video, thank you
@erichopeprince5867
@erichopeprince5867 Жыл бұрын
Thank you for this, please touch on advanced java as a course. Thank you
@AugustLiljegren_
@AugustLiljegren_ 10 ай бұрын
Thank you so much❤
@kookie3878
@kookie3878 2 жыл бұрын
Hi mosh could u plz once again give access to discount of yearly package on your courses I was unable at that time to pay.
@alexandergarciacastaneda9189
@alexandergarciacastaneda9189 Жыл бұрын
hello, would you consider to upload your courses to udemy?
@DaiMoscv
@DaiMoscv 7 ай бұрын
Why are you using var as variable instead of the types?
@KTechy-
@KTechy- 8 ай бұрын
Great video ❤
@blouisuba2647
@blouisuba2647 2 жыл бұрын
Mosh can you go check your data structure and algorithms course part 2 & 3 is redirecting Back to homepage
@UmerFarooq-vk9be
@UmerFarooq-vk9be 2 жыл бұрын
After seeing kotlin syntax i think java is still clear and straight forward
@yassfeealbaloushi2310
@yassfeealbaloushi2310 2 жыл бұрын
hey mosh ,how are you doing? i have a question about your paid courses..so if I subscribe for a monthly payment and enrolled in a course , and the month have passed without me completing the course..will I still be able to get to that course without subscribing for another month? please give me an answer :))
@SHOURYAAAA
@SHOURYAAAA 2 жыл бұрын
This guy is great.
@v.k.5056
@v.k.5056 2 жыл бұрын
Sir, can you make a tutorial video on Golang pls
@AmitKumar-mz2jg
@AmitKumar-mz2jg 2 жыл бұрын
Can we learn python in place of JavaScript?
@khesrawsalehi294
@khesrawsalehi294 Жыл бұрын
Please do java multithreading and java socket programming please
@queryhub5151
@queryhub5151 2 жыл бұрын
Sir hi How to write code I am developing seo tools website using rapid api. But how to take user input in api url ? I mean user enter something in search bar then get data by rapid api. Please help me sir
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@saibalmukherjee6990
@saibalmukherjee6990 2 жыл бұрын
'Mosh' means buffalo in bengali! Thank you so much sir for helping us so much ! i am a kid learning python from your online course and enjoying it as well!
@saibalmukherjee6990
@saibalmukherjee6990 2 жыл бұрын
who liked just now?
@hasin9669
@hasin9669 2 жыл бұрын
আমিও বাঙালি!
@saibalmukherjee6990
@saibalmukherjee6990 2 жыл бұрын
@@hasin9669 oo😄
@makjunior4558
@makjunior4558 Жыл бұрын
Mosh doesn't mean buffalo in Bengali.... It's "mohish"
@saibalmukherjee6990
@saibalmukherjee6990 Жыл бұрын
@@makjunior4558 same...🤗
@bensl3308
@bensl3308 6 ай бұрын
Really great video.
@CharlotteGreen-rc3my
@CharlotteGreen-rc3my Жыл бұрын
good explanation
@abhishekgupta7675
@abhishekgupta7675 2 жыл бұрын
mosh please make a course on spring boot
@pavaniduvvuri6099
@pavaniduvvuri6099 2 жыл бұрын
I am a big fan of mosh because of him i learnt python free that's happy
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@user-tm2uq6ce4h
@user-tm2uq6ce4h Жыл бұрын
When will the spring boot course be released?
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️
@bharat_thapa_
@bharat_thapa_ 2 жыл бұрын
*I would like to know about your next course details*
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@fifaham
@fifaham 7 ай бұрын
Thank you dnldd
@aditisharma3948
@aditisharma3948 5 ай бұрын
what is var ? a data type?
@prashantkumar-kl2ku
@prashantkumar-kl2ku 2 жыл бұрын
What about flutter course
@udaysriramula8148
@udaysriramula8148 2 жыл бұрын
What is web 3
@rudolfmukhammadiev3117
@rudolfmukhammadiev3117 2 жыл бұрын
Please mosh can you create new node course 🙏
@bunyyilmaz7646
@bunyyilmaz7646 5 ай бұрын
- [00:33] 📚 Java Collections Framework Overview - Overview of the Java Collections Framework hierarchy: interfaces represented by green boxes and classes by blue boxes. - Hierarchy breakdown: `Iterable` interface, `Collection` interface, and sub-interfaces (`List`, `Queue`, `Set`) with added functionalities. - Explanations on common operations declared in the `Collection` interface and their significance. - [03:37] 🎶 Iterable Interface's Purpose and Problem Resolution - Understanding the `Iterable` interface: its place in Java, functionality for iteration over objects. - Demonstrating a problem with iterating over a generic list, highlighting issues with exposing internal implementations. - Analogies with remote controls and encapsulation in object-oriented programming. - [07:41] 🔍 Benefits of Implementing the Iterable Interface - Exploring the benefits of implementing the `Iterable` interface: independence from internal implementations. - Details on the `Iterator` interface and its role in simplifying iteration over collections. - Demonstrating the conversion of a for-each loop into iterator operations via Java compilation. - [09:02] 🧩 Implementing the Iterator Interface - Step-by-step implementation of the `Iterator` interface within the `GenericList` class. - Construction of a private nested class, `ListIterator`, and methods (`hasNext`, `next`) for iteration control. - Enabling iteration over a generic list without exposing its internal structure. - [13:06] 📦 Collection Interface Introduction - Introduction to the `Collection` interface: its representation as a container for objects. - Explanation of essential operations (`add`, `remove`, `contains`, etc.) declared in the `Collection` interface. - Insight into extending the `Iterable` interface and common implementations like `ArrayList`. - [20:00] 📂 Demonstrating Collection Interface Operations - Implementation examples using the `Collection` interface within the `CollectionsDemo` class. - Methods for adding, iterating, removing, checking existence, and converting collections to arrays. - Utilizing utility methods like `addAll`, `size`, `clear`, and others within the `Collection` interface. - [23:50] 📚 Converting Collection to String Array - Converting a collection to a string array allows access to string methods. - Utilizing `collection.toArray()` with a specified array type permits access to string methods easily. - Utilizing `var` simplifies code readability despite arguments against its usage due to clarity in object type identification. - [25:40] 🔍 Comparing Collections - Comparing two collections for equality using `collection.equals(other)` compares their memory references. - Checking for identical content between collections is done through `collection.equals(other)` method, which compares their actual content. - [28:02] 📋 Exploring List Interface - The List interface manages ordered collections where accessing objects by index is crucial. - List operations include adding, inserting, retrieving by index, and removing items at specific indices. - Features such as `list.subList()` provide functionality to obtain a sublist from a List. - [30:27] 🔍 Using List Interface Methods - Methods like `list.remove(index)` in List interface allow removal by specific index, a feature absent in general collections. - `list.indexOf()` and `list.lastIndexOf()` determine the first and last indices of an element, respectively, aiding in search operations. - The `list.subList(from, to)` method extracts a section of the list between two specified indices. Made with HARPA AI
@umarani4657
@umarani4657 2 жыл бұрын
Java is a best of millions of the world 🌎 by the way to
@androidprojects2706
@androidprojects2706 2 жыл бұрын
Hello Mosh, your videos has took me far in programming, pls.. I have some problem, my last comment you didn't reply for about three weeks now... How can I reach you so I can drive my questions to you personally rather than here ?
@amitnagdev5111
@amitnagdev5111 2 жыл бұрын
Mosh, i'm grateful for the content you uploaded on the youtube for free of cost.But one thing that i would like to address is that the pricing of the paid course is minimal according to U.S., but not for the asian community following you. So on behalf of all of them i request you to please consider differential pricing if possible.
@naufaladi.youtube
@naufaladi.youtube 2 жыл бұрын
yes, price localisation would be great (For perspective, the minimum wage in Indonesia capital city is less than $350 USD per month, or about $4200 yearly)
@xxbossxx_king9383
@xxbossxx_king9383 2 жыл бұрын
Make a course of Dart programming language ❤️
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@blouisuba2647
@blouisuba2647 2 жыл бұрын
Mosh how can I have a one on one conversation with you.
@superboy3625
@superboy3625 2 жыл бұрын
Hello sir pls make a full course video on git .
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@GeeksForCode511
@GeeksForCode511 2 жыл бұрын
Why not do a course on a programming language C++?
@gutufida4641
@gutufida4641 2 жыл бұрын
What is 'var' in java?
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@rezahajitarkhani7788
@rezahajitarkhani7788 2 жыл бұрын
سلام خیلی عالی بود
@saraayub171
@saraayub171 2 жыл бұрын
Hi mosh sir
@markosmuche4193
@markosmuche4193 2 жыл бұрын
Are you ethiopian?
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@nilesh6929
@nilesh6929 2 жыл бұрын
Start a course on Android app development
@comradeishaan89604
@comradeishaan89604 2 жыл бұрын
Ishaan
@asktostranger8296
@asktostranger8296 9 ай бұрын
Make your all paid courses free , then see the magic
@saraayub171
@saraayub171 2 жыл бұрын
Are you from America
@ncertsimplified1491
@ncertsimplified1491 2 жыл бұрын
Hi Sara. How are you.
@olowojobabankole4671
@olowojobabankole4671 11 ай бұрын
I like mosh ally but this video made collections more complicated than it is
@saraayub171
@saraayub171 2 жыл бұрын
Hi
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@abeerizar5337
@abeerizar5337 7 ай бұрын
شرح حيل عميق مومال مبتدئين
@erfan_ops
@erfan_ops 2 жыл бұрын
Are you iranian?
@RedRebel8
@RedRebel8 Жыл бұрын
Too many ads - it kills your concentration.
@adityabiswal5506
@adityabiswal5506 2 жыл бұрын
202nd view.
@almanduku9043
@almanduku9043 4 ай бұрын
I didn't like it, completely not practical you tell that
@alexkart
@alexkart 2 жыл бұрын
Обращаюсь к российским айтишникам. У вас забирают лучшие года жизни. kzbin.info/www/bejne/qquvhJmNfNFqbKM
@user-ze6uv7qq5d
@user-ze6uv7qq5d Жыл бұрын
Questions can come in⬆️.
@theaftermath98
@theaftermath98 Жыл бұрын
your videos are not good for beginners, many be people who know something a bout java but for an absolute beginner will always have loop holes in the understanding, but anyway thanks
@user-vb8iq1bs2v
@user-vb8iq1bs2v Жыл бұрын
Sorry, but code at 4:55 doesn't work. While it shows no errors, when trying to run it, I get: Exception in thread "main" java.lang.ClassCastException 🤷‍♀️
@mohammadimran9471
@mohammadimran9471 8 ай бұрын
I need your GMail address. because i need a business app
@komuoirish7396
@komuoirish7396 2 жыл бұрын
Sir please, give me your email 🙏
Set and HashSet in Java - Full Tutorial
20:43
Coding with John
Рет қаралды 186 М.
Java Generics Tutorial
18:12
Programming with Mosh
Рет қаралды 60 М.
0% Respect Moments 😥
00:27
LE FOOT EN VIDÉO
Рет қаралды 44 МЛН
Which one will take more 😉
00:27
Polar
Рет қаралды 76 МЛН
😱СНЯЛ СУПЕР КОТА НА КАМЕРУ⁉
00:37
OMG DEN
Рет қаралды 1,8 МЛН
Когда на улице Маябрь 😈 #марьяна #шортс
00:17
Intro to Java Programming - Course for Absolute Beginners
3:48:25
freeCodeCamp.org
Рет қаралды 2,8 МЛН
Коллекции в Java: List, Set и Map
18:59
Devmark Ru
Рет қаралды 32 М.
Is Coding Still Worth Learning in 2024?
9:33
Programming with Mosh
Рет қаралды 154 М.
Generics In Java - Full Simple Tutorial
17:34
Coding with John
Рет қаралды 1 МЛН
LinkedList vs ArrayList in Java Tutorial - Which Should You Use?
11:43
Coding with John
Рет қаралды 564 М.
Stop Wasting Time on the Wrong Languages
2:15
Programming with Mosh
Рет қаралды 37 М.
Lambda Expressions in Java - Full Simple Tutorial
13:05
Coding with John
Рет қаралды 685 М.
Array vs. ArrayList in Java Tutorial - What's The Difference?
17:36
Coding with John
Рет қаралды 480 М.
0% Respect Moments 😥
00:27
LE FOOT EN VIDÉO
Рет қаралды 44 МЛН