- Видео 70
- Просмотров 106 152
Will Tollefson
Добавлен 12 дек 2022
Hello! My name is Will Tollefson, and I'm a software engineer who enjoys learning and teaching others! I've been programming for over a decade now; the field of computer programming is continuously evolving, requiring even the most experienced programmers to acquire new skills. Whether its website design, artificial intelligence, or mobile app development, knowledge of computer programming opens the door to jobs in the tech sector, new hobbies, or impressing your grandma with your savvy computer skills! I've created this channel for beginning to expert programmers alike as a resource for learning and staying on the edge of programming.
Java 23: What You Need to Know
In this video we'll cover the highlights of Java 23. There were 13 "major" changes as part of this JDK release, including new features, removals, and continuations.
I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others what I've learned. If you're enjoying the content, please LIKE, SUBSCRIBE, and SHARE!
LINKS:
OpenJDK release page: openjdk.org/projects/jdk/23/
VIDEO CHAPTERS:
0:00 Overview
1:00 Primitive Pattern Matching
4:54 JavaDoc Markdown
6:12 Module Import Declarations
7:20 Z Garbage Collector Generational Mode
8:44 String Templates Are No More
9:35 Key Deprecations in Unsafe
10:46 Feature Preview Continuations
17:12 Vector API Current Status
17:49 Closing Thoughts...
I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others what I've learned. If you're enjoying the content, please LIKE, SUBSCRIBE, and SHARE!
LINKS:
OpenJDK release page: openjdk.org/projects/jdk/23/
VIDEO CHAPTERS:
0:00 Overview
1:00 Primitive Pattern Matching
4:54 JavaDoc Markdown
6:12 Module Import Declarations
7:20 Z Garbage Collector Generational Mode
8:44 String Templates Are No More
9:35 Key Deprecations in Unsafe
10:46 Feature Preview Continuations
17:12 Vector API Current Status
17:49 Closing Thoughts...
Просмотров: 482
Видео
Are You Using This NEW Java Feature?
Просмотров 5535 месяцев назад
In this video we'll cover the STRING TEMPLATES feature in JDK 22. One immediate benefit of this feature is that it better streamlines string interpolation, but these NEW JAVA TEMPLATE EXPRESSIONS can do A LOT more than that! I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others what I've learned. If you're enjoying the content, please LIKE, SUBSCRIBE, and SHARE! LINKS: JEP...
Socket Programming with Java NIO - Channels, Selectors, and Buffers
Просмотров 2 тыс.6 месяцев назад
In this video we'll cover SOCKET PROGRAMMING using the JAVA NIO library. We'll make an example client/server aplication where the server only requires one thread to handle multiple client connections! In the process we'll touch on CHANNELS, SELECTORS, and BUFFERS, and why byte order and ENDIANNESS matter in computer networking.Network byte order is BIG ENDIAN, but you should always confirm byte...
Java Network Sockets + Virtual Threads = Cool!
Просмотров 1,4 тыс.7 месяцев назад
In this video we'll cover SOCKET PROGRAMMING in JAVA. We'll touch on both SINGLE and MULTITHREADED server applications that have server sockets waiting for client connections. Java sockets are built upon TCP, but the API also provides DatagramSocket, a UDP based implementation sometimes used in particular applications. Also be sure to stick around till near the end where we talk about the Java ...
Operator Overloading in Kotlin
Просмотров 2057 месяцев назад
In this video, we'll cover how to perform OPERATOR OVERLOADING IN KOTLIN. We'll go through a few examples of operators such as addition, comparison, and indexing. I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others what I've learned. If you're enjoying the content, please LIKE, SUBSCRIBE, and SHARE! VIDEO CHAPTERS: 0:00 Introduction 1:11 Addition 4:36 Prefix and Postfix ...
Scoped Values in Java 22
Просмотров 1,1 тыс.7 месяцев назад
In this video we'll cover SCOPED VALUES IN JDK 22. We'll talk about what a ScopedValue gets you vs prior ThreadLocal code examples and why you should probably migrate to ScopedValue especially int the context of virtual threads and structured concurrency. Scoped values address some of the main problems with ThreadLocal such as UNCONSTRAINED MUTABILITY, UNBOUNDED LIFETIMES, and EXPENSIVE INHERIT...
Inheritance and Solving the Diamond Problem in Kotlin
Просмотров 2058 месяцев назад
In this video, we'll cover HOW INHERITANCE WORKS IN KOTLIN. We'll go into a little bit of POLYMORPHISM as well with METHOD OVERRIDING, using the SUPER keyword and a couple corner case situations. I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others what I've learned. If you're enjoying the content, please LIKE, SUBSCRIBE, and SHARE! VIDEO CHAPTERS: 0:00 Introduction 0:46 ...
Structured Concurrency in Java 21
Просмотров 1,9 тыс.8 месяцев назад
In this video we'll cover STRUCTURED CONCURRENCY IN JDK 21. We'll talk about some of the differences between ExecutorService and StructuredTaskScope as well as touching on things like impacts to THREAD DUMPS. I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others what I've learned. If you're enjoying the content, please LIKE, SUBSCRIBE, and SHARE! LINKS: JEP 453: openjdk.or...
Kotlin Classes and Constructors - Primary vs Secondary
Просмотров 4558 месяцев назад
In this video, we'll cover how to MAKE YOUR OWN KOTLIN CLASS, including methods for customizing this with PRIMARY AND SECONDARY CONSTRUCOTRS. We'll also touch briefly on the FOUR VISIBILITY MODIFIERS IN KOTLIN. I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others what I've learned. If you're enjoying the content, please LIKE, SUBSCRIBE, and SHARE! VIDEO CHAPTERS: 0:00 Int...
The Abstract Factory Design Pattern In Java
Просмотров 1,6 тыс.9 месяцев назад
There are multiple variants of the FACTORY DESIGN PATTERN IN JAVA. In this video, we'll go through the ABSTRACT FACTORY PATTERN, which is a continuation of the FACTORY METHOD PATTERN with additional factory methods used to create groups of like objects. This pattern, while more complicated, can have some real benefits down the road for extendability and testability. I'm Will Tollefson, a guy wh...
Kotlin Avoided a $1,000,000,000 Mistake
Просмотров 7189 месяцев назад
Kotlin was designed with NULL SAFETY in mind, which largely allows it to avoid the major issue of unexpected null pointer dereferencing. In other programming languages, this has caused numerous issues over the years, in my opinion easily culminating in over $1,000,000,000 in costs. In this video I'll go over different aspects of Kotlin's null safety approach including the SAFE CALL OPERATOR, EL...
Virtual Threads in Java 21
Просмотров 6 тыс.9 месяцев назад
In this video we'll cover a relatively new feature to the Java language, VIRTUAL THREADS. We'll talk about some current BEST PRACTICES of using them and cover SIMPLE EXAMPLES of how you can use them in your code. I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others what I've learned. If you're enjoying the content, please LIKE, SUBSCRIBE, and SHARE! LINKS: JEP 444: openjd...
Collections In Kotlin: Intro to List, Set, and Map
Просмотров 2769 месяцев назад
Some of the fundamental building blocks of Kotlin are the language's builtin COLLECTIONS: LIST, SET, and MAP. In this video we'll go through how to make these collections and talk about some of their similarities and differences. We'll also talk about MUTABLE vs READ-ONLY variants of these collections. I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others what I've learned...
The Factory Design Pattern In Java
Просмотров 2,6 тыс.10 месяцев назад
There are multiple variants of the FACTORY DESIGN PATTERN IN JAVA. In this video, we'll go through the two most common adaptations, the SIMPLE FACTORY PATTERN and the (regular) FACTORY METHOD PATTERN. If the regular FACTORY PATTERN doesn't quite scratch your itch, I'd recommend you look at the ABSTRACT FACTORY PATTERN I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others w...
Getting Started With Kotlin: The Basics
Просмотров 60910 месяцев назад
Let's write our FIRST KOTLIN PROGRAM! In this video, we'll make a KOTLIN HELLO WORLD program and then introduce concepts like VARIABLES and KOTLIN's TYPE INFERENCE, also scratching the surface of Kotlin's powerful STRING TEMPLATES. I'm Will Tollefson, a guy who loves to NEVER STOP LEARNING and teach others what I've learned. If you're enjoying the content, please LIKE, SUBSCRIBE, and SHARE! VID...
The Singleton Design Pattern In Java
Просмотров 85710 месяцев назад
The Singleton Design Pattern In Java
How to Create Your First Maven Java Project
Просмотров 89810 месяцев назад
How to Create Your First Maven Java Project
Java Just Got Easier to Learn and Teach | Java's New Hello World
Просмотров 1,1 тыс.10 месяцев назад
Java Just Got Easier to Learn and Teach | Java's New Hello World
Are You Using Java's Parallel Streams Correctly? - Java Programming
Просмотров 6 тыс.11 месяцев назад
Are You Using Java's Parallel Streams Correctly? - Java Programming
Countdown to Christmas Java Application Full Walkthrough - Java Programming
Просмотров 46811 месяцев назад
Countdown to Christmas Java Application Full Walkthrough - Java Programming
Java Annotations and How to Build Your Own Runtime Annotations - Java Programming
Просмотров 1,8 тыс.11 месяцев назад
Java Annotations and How to Build Your Own Runtime Annotations - Java Programming
How to Use JDBC to Read From a MySQL Database - Java Programming
Просмотров 78211 месяцев назад
How to Use JDBC to Read From a MySQL Database - Java Programming
Java Optionals, a Practical Walkthrough - Java Programming
Просмотров 977Год назад
Java Optionals, a Practical Walkthrough - Java Programming
Coding a Java Sudoku Solver - Java Programming
Просмотров 3,1 тыс.Год назад
Coding a Java Sudoku Solver - Java Programming
How to Really Debug Java Streams - Java Programming
Просмотров 995Год назад
How to Really Debug Java Streams - Java Programming
Reflection in Java: The Fundamentals - Java Programming
Просмотров 3,5 тыс.Год назад
Reflection in Java: The Fundamentals - Java Programming
Java's Stream API Explained - Java Programming
Просмотров 1,3 тыс.Год назад
Java's Stream API Explained - Java Programming
Checked and Unchecked Exceptions in Java - Java Programming
Просмотров 1,7 тыс.Год назад
Checked and Unchecked Exceptions in Java - Java Programming
Building a Snake Game in Java: A Complete Walkthrough - Java Programming
Просмотров 7 тыс.Год назад
Building a Snake Game in Java: A Complete Walkthrough - Java Programming
The Basics of Debugging Your Code in IntelliJ - Java Programming
Просмотров 15 тыс.Год назад
The Basics of Debugging Your Code in IntelliJ - Java Programming
Amazing content 👏🏻👏🏻👏🏻
Underrated channel!! Love it how you have videos on latest features Keep coming up with these!!
Thanks so much!
Any chance you make a video about RMIs?
You’re talking about Java’s remote method invocation, right? I’m a little curious on what the use case is :) I’ve done a lot more with CORBA, but I can brush up on RMI and make a video if you’d like!
@@willtollefson the use case is a college class. This time it's a course about distributed systems. Your socketing videos helped a bunch last semester, you make quality content.
Got it - that makes sense. I’ll try to post something about Java RMI in the next few weeks. Good luck with classes this semester!
Thanks man
Great job explaining this. Very informative and fun.
Thank you! Glad you liked it
When you are speeding up, you are all over the place. Why I gave thumbs down, I got lost.
Thanks for the comment - I can try to slow down a bit during the parts at the end where it’s a lot easier to jump around the code more. I also have the full code posted if that helps
For real, Will thx for savin' us from those boring, overcomplicated explanations. Keep droppin' that code wisdom, King! 💻👑 You're the GOAT of Java vibes!
You bet. Happy to help!
beast
Watched several videos on this. This is the first one that made sense. Thanks!
Glad to hear it helped!
Great tutorial! But... Is there no GitHub link? I'm willing to go through the hassle of typing the code, though I'm not very fond of doing it...
Updated the video description with a link to the code on GitHub. Enjoy!
Thanks! In the meantime I went through the pain of copying. I slightly adapted it, to use UnixSockets. I'll probably push it to GitHub one of these days.
thanks for your video :)
My pleasure!
I love your videos and I think you're a fantastic educator, but sometimes this music drives me bonkers.
Appreciate the feedback. In later videos I haven’t been doing the music. Be sure to check some of those videos out!
This is one of your best videos :)
Thanks, I’m glad you liked it!
Amazing explanation. You got my subscription. Where can we see the code to analyze ourselves? I was unable to find any github links. Thank you
It’s on my todo list to get the code from these videos on GitHub and I haven’t gotten to it yet - sorry about that!
github.com/Will-Tollefson/yt-java/tree/master/2024/Factory%20Pattern I also updated the video description. Enjoy!
This is amazing.
Very nice, I use the same code, jdk 11, debug on Eclipse 4.24.0, process stops at selector.select(); Any suggestion?
selector.select() is a blocking call. I assume when you say that the process stops that you're saying the program hangs at that call rather than the program stopping such as throwing an exception or Java crashing entirely. That call is a blocking call because the selector is waiting for an operation on one of its selected keys to fire. If the selector has a key registered and that key triggers an event, you should move on from that select() method and into more logic in your code. For example, the code in the video moves on initially when a socket connection gets established and the OS is ready to accept the connection.
I need help, every breakpoint I set in the code doesnt have a check mark none of them work
It might be good to take out some of the complexity to verify your setup. Write a simple program and add breakpoints to make sure in the nominal case you can see them. Once you have that working, slowly go back to your problem at hand and confirm the setup is equivalent, you’re hitting the code you think you are, and the breakpoint is enabled and not conditional. Good luck!
Hello. thank you for this video. You declared "final int PORT_NUMBER = 12345;" in the "Main" class and used it in the "start()" method of "MyClient" class. However, "MyServer" class returns 50071 or 50072 when it calls "client.getPort()". Could you please explain why the client port number returned is 50071 and not 12345 ?
Happy to do so! PORT_NUMBER is referring to the source port number for the server specifically. The reason both the client and server need this is because the server uses it to bind the server socket and the client uses it as a destination port when it talks to the server. The port that is printed out in the output window is the client's source port (aka the server destination port), which by default is determined by the OS when the client creates the TCP socket.
Awesome video!
Thank you for the lesson
You’re welcome!
Nice overview! It is great to see you back online after your paternity leave :-)
I am just starting out in Java using Processing to create physics simulations. Would virtual threads help with n-body problems?
Great question! Short answer: yes it could help depending on the context As far as I know Processing ships with its own Java version, so you’d need to make sure it’s using Java 21 or later. Also it’s been a while since I’ve looked at the n body problem, but if your equations can provide sufficiently discrete computations that don’t require too many hand offs, then yes scaling the application to more bodies can be more efficiently done with virtual threads. Hope this helps!
@@willtollefson thanks, I'll give it a try. Only one way to find out!
Great content! Your videos deserve a lot more views. Please keep making Java videos.
Thanks so much. I’ll keep posting Java content when I can!
Thanks for all the info about what has changed in this version and where to go for more information
You’re welcome!
Excellent video, Will! I like how you stay on top of the newest functionality and trends as they become available.
Thanks! I was a little later making this video than I wanted to be, but here I am!
nice teeth. nice examples
Your amazing and explained this well +1 & 👍
Thank you!
Thanks for this tutorial.
Glad you liked it! I thought this one was fun to make 🙂
You made the L, you have my like, it's a joke from Brazil, good job.
thanks will ,u r doing great
This changed my life.
Really awesome! Thanks so much!
Happy to help!
❤❤
Just came across this video because I've been researching SOLID principles and patterns for a potential job .This made it a lot easier to understand how to implement some of those principles and made it very clear how to use a Factory to do so, which was also a new concept for me. Thanks
Glad to hear the video was helpful! Factory and its variants are definitely some of the key OOP patterns. A few other good ones I see regularly are state, observer, decorator, and strategy. Good luck!
Your video is very helpful ,for those who struggle to understand constructor ,thank u so much
You’re welcome. Glad to hear that it was helpful!
Awesome..
Thanks!
Great into tutorial! However, I wish you went a little more into detail at the end. For instance, how do we find which threads the thread numbers are referring to? Also, how do we know which objects the threads are locked? You got answers like "0x2fc," but how do we find which variable that is referring to?
Thanks for the question! The short answer is that the stack traces in the thread dump will usually tell you enough for a simpler example like this, but I do hear your point about more advanced debugging. In this particular example the trace tells you the line number its blocking on waiting for monitor entry and it tells which thread its waiting on. I've thought about making a video (or a series) on different debugging techniques with threading issues being a top contender. Is that something you'd like to see?
@@willtollefson Yes; I would love a series about that. I have been studying computer science for two years now, but my textbook and classes never talked about the debugger. It's actually really embarrassing that I know nothing really about it😂😂
@audiomac sounds good - I totally get it and I've heard that from a lot of folks. It seems like teaching debugging isn't always a priority which is odd to me since that's a decent portion of what devs do in industry. I'll see about putting out some more debugging videos in the future. Thanks!
Why java is very complex. literally i don't understand anything 😥
There are parts that are harder than others, yes. I found it helpful to take a higher level look at the stream API before taking a deeper dive into a component of it. If there’s anything I can help explain better, feel free to reply on this thread!
So good man, well taught! Thank you!
My pleasure!
Wow this is detailed in a simplified way, and your speed is very very comfortable for me and very easy for a new bee to understand debugging
Glad it was helpful!
Excuses me sir. Can you make videos about JDK, JVM and JRE?
Sure! Anything specifically you’d like to see?
Hii Will, Thanks for making this video. I have a quick question here , it may seem little bit silly to you. why in 12:02 section of the video, we are trying to use a object instance of Thread class to call print status method. Pls explain if possible. and Thanks again!
Thanks for the question! I glossed over that part in the video. The reason it’s doing that is because there needs to be a way to look at the status of the 1000 requests asynchronously and the way I implemented it was a status thread that starts executing after you construct the Server object. It could have instead been a getter that gets called periodically after the requests start submitting, but with the code as written if it weren’t done in a separate thread, the executor block would never be hit because the main class would have been blocked after Server constructor if that private method was called from in the constructor with the same thread. Hope this helps!
Thanks!
The only thing I actually care about is that you're using IntelliJ. You're already 12 light-years ahead of anybody using Eclipse.
A while back I was a big eclipse user. The last 5 years or so IntelliJ has been my go to though. Hope you liked the video!
can explain garbage collector
Do you want to know about how garbage collection works in Java in general, or specifically how it would pertain to something like a template expression?
For the measure performance Instance + Duration. Good Video
Thanks!
THANK YOU!!! Your video helped me understand the difference between the two after a Udemy course failed doing so. Granted, I had to pause a few times and look up more stuff that I forgot already, but now ... 🤯 And as a lover of keyboard shortcuts, the sout > System.out.println() made me incredibly happy.
Me at the start of this video: "Ah, how simple, I understand everything." After the 11th minute: "F-ck."
Threading issues and deadlocks can be some really interesting bugs to solve, which is why those thread dumps can be really useful!
Detailed explanation!! Subscribed already
For the reduce function, about what is happening. Is it (1001 + 1002 + ...) or (101 + 102 + ...) 12:32
Good catch - its supposed to be (101 + 102 + ...). I must have had the number "1000" in my head. Thanks for noting that!