Deege
Deege
  • 90
  • 1 995 599
Java Generics Tutorial - 053
At some point you've likely heard about Java generics. Generics were introduced into the Java language in Java 5. In the next few videos, we're going to take a deep dive into what generics are, how to use them, and ultimately how to create our own Java generics.
A generic is a class that acts like a template for creating classes. In this case, we define how the list works without stating what classes the list holds. We'll have add and remove methods, but we won't say what class we're adding and removing until we define the instance. Once we instantiate our class, we'll tell it the type our list works with. No other type is allowed. Using a generic class gives us type safety.
#java #programming #tutorial #generics

Like the video? Don't forget to subscribe! ➜ www.deegeu.com/subscribe

Keep up to date with the newsletter! ➜ www.deegeu.com/newsletter/

Transcript ➜ www.deegeu.com/java-generics-tutorial/ ‎
Concepts: Java generics, Java
Social Links: Don't hesitate to contact me if you have any further questions.
WEBSITE : dj@deegeu.com
TWITTER : deege
FACEBOOK: deegeu.programming.tutorials
GOOGLE+ : google.com/+Deegeu-programming-tutorials
About Me: www.deegeu.com/about-programming-tutorial-videos/
Related Videos:
ua-cam.com/play/PLZlGOBonMjFWI_JOcZQJURzVZvaSWcA8m.html
Media credits: All images are owned by DJ Spiess or used under CC0 unless listed below
Airport Lounge - Disco Ultralounge by Kevin MacLeod is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/by/4.0/)
Source: incompetech.com/music/royalty-free/index.html?isrc=USUAN1100806
Artist: incompetech.com/
Переглядів: 16 082

Відео

How to create a repository in GitHub - CM005
Переглядів 15 тис.7 років тому
We're going to set up a new repository with our source code mostly from the command line. If you're already used to using git, this will be review. In the next git video, we'll go over the development process. And then we'll connect this together to automatically add Git versioning inside our microservice. But we have to set things up first. A best practice is to get all of this in place early ...
How to split a Java String - 052
Переглядів 37 тис.7 років тому
In this tutorial we're going to look at how to split a string in Java. We can split the string by character or split the string by words. We'll look at both! We're going to look at simple string manipulation because it's a very common task. Quite often we're going to be asked to take a string and manipulate it character by character. That means we need to know how to how to split a string chara...
JUnit test case example in Java - CM004
Переглядів 12 тис.7 років тому
We're going to look at Java unit tests using JUnit. Testing code is extremely important, and even more so when we start automating our build process. Java unit tests are classes which test our application classes. This is the fifth video in a larger playlist for creating microservices in Java. You can find the link for the full playlist in the text below. We're using JUnit and Apache Maven to h...
Implementing a REST interface for a Java Microservice - CM003
Переглядів 16 тис.7 років тому
In this tutorial we're going to start implementing our microservice. For this video, that means we're going to add the Java code for the classes we defined in the last video. Since there aren't too many classes, our plan for this video is to just go over the code for every class. This is the fourth video in a larger playlist for creating microservices in Java. You can find the link for the full...
Creating a Microservice Class Architecture - CM002
Переглядів 18 тис.7 років тому
In this video we're going to take a quick look at the design for the our microservice class architecture. It's important to go over this so we can understand what the microservice does, and how the code is organized. We're going to look at this in two steps. First we'll cover the use cases for our trivia service. This will give us an understanding on what tasks the service handles. This will be...
Create a new Maven project for our Java microservice - CM001
Переглядів 23 тис.7 років тому
In this video we're going to create a new Maven project for our microservice. This will allow us to consistently build our application on different machines. The Apache Maven project will also help us later when we add our code to our continuous integration process. We're going to start with no code, and get a simple microservice running using Wildfly Swarm. This tutorial will just be on the ap...
Creating a Java Microservices Architecture from Scratch - CM000
Переглядів 52 тис.7 років тому
Over the next few videos, we're creating a trivia question Java microservice from scratch, end-to-end. That means all the code, and all the infrastructure to build, test, deploy and run. To start, this video is an road map for the microservice we're going to create. It will give you an idea for all the technologies we'll use to create our microservice. This is the first video in the series, and...
The secrets of Java String concatenation - 051
Переглядів 3,1 тис.7 років тому
In this tutorial we're going to look at Java string concatenation. Concatenation is taking two strings, and making them one. There's several ways to do this, each with their own advantages and disadvantages. #java #programming #tutorial ▼ Like the video? Don't forget to subscribe! ➜ www.deegeu.com/subscribe ▼ Keep up to date with the newsletter! ➜ www.deegeu.com/newsletter/ ▼ Transcript ➜ www.d...
Watch this Java String Tutorial! - 050
Переглядів 2,1 тис.7 років тому
In this video we're going to start looking at strings. Strings represent the text we use in applications. We'll start with the basics in this tutorial, and over the next few videos we'll cover more complex string topics. This video looks at Java Strings, testing String equality, and interning strings in the Java String pool. #java #programming #tutorial ▼ Like the video? Don't forget to subscri...
Java Bit Manipulation using the Java Integer Class - 049
Переглядів 5 тис.7 років тому
In this Java programming tutorial we're going to look at bit manipulation using the Java Integer class. Bit manipulation is used in error correction, compression, encryption and optimization algorithms. It's one of those things that's really important, or you won't see it at all. But it's really important. There are many operators we use to manipulate bits, but as we saw in previous Integer cla...
Question: What is the the imageWasSavedSuccessfully function?
Переглядів 3448 років тому
In this video, we’ll take a quick look at the Swift method imageWasSavedSuccessfully when taking pictures with our iOS camera. Hi, I’ve been getting many questions in the comments, so I figure it’s time we start answering some in their own videos. In the “How to access the iOS camera using Swift 2.0”, 00bikeboy asks “The transcript doesn’t go into the imageWasSavedSuccessfully function. Any cha...
What is Docker?
Переглядів 66 тис.8 років тому
You've likely heard about Docker. It's one of the big buzzwords currently running through the IT industry. Docker is a Linux container technology that lets us package and ship our applications and everything it needs to execute into a standard format, and run them on all our existing Linux hardware. That might sound like a virtual machine, and it's a good start on how to think about Docker cont...
How to compare Java Number instances - 048
Переглядів 2,7 тис.8 років тому
In this lesson we're going to look at comparing Java Number instances. For starters, since Numbers are objects, we can't use the regular arithmetic operators. When we use the primitive operators with objects, we're comparing the instances - not the values inside the instance. #java #programming #tutorial ▼ Like the video? Don't forget to subscribe! ➜ www.deegeu.com/subscribe ▼ Keep up to date w...
How to deploy your Java applications using Docker
Переглядів 71 тис.8 років тому
Here's our goal for this tutorial. We will compile the Java code, and on a successful build, we’ll package it up into a jar, and create a Docker container containing our Java application. We’ll do all of this within Maven. The Maven script can be called from any continuous integration tool. From there we can push the docker file to a Docker repository, or we can use it to spin up as many instan...
Using Java Number Class Methods - 047
Переглядів 3,7 тис.8 років тому
Using Java Number Class Methods - 047
What are the Java Number Class Constants? - 046
Переглядів 2,7 тис.8 років тому
What are the Java Number Class Constants? - 046
Creating a Custom UITableViewCell in Swift 2.0
Переглядів 3,6 тис.8 років тому
Creating a Custom UITableViewCell in Swift 2.0
UITableView tutorial using Swift 2.0
Переглядів 3,8 тис.8 років тому
UITableView tutorial using Swift 2.0
What is Autoboxing and Unboxing in Java? - 045
Переглядів 34 тис.8 років тому
What is Autoboxing and Unboxing in Java? - 045
Java Try with Resources - 043
Переглядів 10 тис.8 років тому
Java Try with Resources - 043
How to handle 10 common Java Exceptions - 042
Переглядів 13 тис.8 років тому
How to handle 10 common Java Exceptions - 042
Java Exception Handling - 041
Переглядів 25 тис.8 років тому
Java Exception Handling - 041
Java Interfaces Explained - 040
Переглядів 156 тис.8 років тому
Java Interfaces Explained - 040
How to make iPhone apps talk using text to speech
Переглядів 3,7 тис.8 років тому
How to make iPhone apps talk using text to speech
Overriding equals and hashCode in Java - 039
Переглядів 82 тис.8 років тому
Overriding equals and hashCode in Java - 039
How to capture video in iOS 9 and Swift 2.0
Переглядів 9 тис.8 років тому
How to capture video in iOS 9 and Swift 2.0
When to use an abstract class in Java - 038
Переглядів 125 тис.8 років тому
When to use an abstract class in Java - 038
Building an iOS 9 Share Extension with Swift 2.0
Переглядів 28 тис.8 років тому
Building an iOS 9 Share Extension with Swift 2.0
How to write a copy constructor in Java - 037
Переглядів 34 тис.8 років тому
How to write a copy constructor in Java - 037

КОМЕНТАРІ

  • @hansmalm2801
    @hansmalm2801 5 днів тому

    You have great teacher skills. Probably one of the best programming videos around. But that music in the background is driving me insane. It's a shame.

  • @hansmalm2801
    @hansmalm2801 15 днів тому

    It's amazing so few have found this series. It's one of the best for Java.

  • @ep4782
    @ep4782 27 днів тому

    The music is too loud and quite distracting 😶

  • @reygv8951
    @reygv8951 28 днів тому

    i started watching ur video but then i saw that disgusting symbol on ur shirt. you and all of those who think it is cool are more than welcome to come to cuba and live on a 5-dollar pension

  • @Maxi-ym8du
    @Maxi-ym8du Місяць тому

    fucking legend!

  • @diehardwalnut
    @diehardwalnut 2 місяці тому

    Interesting, i read an article on DigitalOcean that suggested making the Game class have a private constructor and to make GameBuilder an inner static class. This way, the only way you can instantiate Game is to use the builder. Good video!

  • @goobertfroobert5572
    @goobertfroobert5572 2 місяці тому

    Is a decade old tutorial still viable?... I feel so dumb man. I have no idea what I'm doing and I've gotten to the "Hello world" thing a dozen times at least and still have no idea what the hell any of it means. Why is this so damn confusing?

  • @assslayerslayedass
    @assslayerslayedass 2 місяці тому

    Your shirt almost ruined the whole video. I am thinking about it ehat it means

  • @drcl7429
    @drcl7429 4 місяці тому

    Think I finally get it because of the explanation on previous videos. Proper teaching.

  • @mohammedsaqibsiddiqui7217
    @mohammedsaqibsiddiqui7217 5 місяців тому

    Which IDE are you using ??

  • @cotyb5028
    @cotyb5028 6 місяців тому

    I like your The Hitchhiker's Guide to the Galaxy reference there.

  • @Allalilacias
    @Allalilacias 6 місяців тому

    Thank you for the speed and clarity of the explanations. Great video!

  • @pleinair6318
    @pleinair6318 8 місяців тому

    Damn, you'd think after decades Java would already have a solution to this

  • @zeppelinmexicano
    @zeppelinmexicano 9 місяців тому

    Thumbs up. I like much your attitude toward using import correctly!

  • @seabrin
    @seabrin 10 місяців тому

    I really appreciate the context. Showing various ways to close a file before try-with-resources is brilliant. The reminder that there's documentation for further information is icing on the cake. Subscribed immediately.

  • @contort69
    @contort69 10 місяців тому

    This is not the ideal way for me to learn this..this is like a lecture

  • @SuperMalachiDude
    @SuperMalachiDude 10 місяців тому

    ( ͡° ͜ʖ ͡°) 0:29

  • @samitee8336
    @samitee8336 10 місяців тому

    from the future, driverless cars now exist!

  • @andrewTit11
    @andrewTit11 11 місяців тому

    what happened to you

  • @loladiazvarela8855
    @loladiazvarela8855 Рік тому

    thank you!

  • @victrur
    @victrur Рік тому

    Excelent explanation!

  • @7654321romer
    @7654321romer Рік тому

    Great explanation, I loved that the video not too long despite the amount of detail.

  • @Kevin-uh4km
    @Kevin-uh4km Рік тому

    4:44 Thank you! I could not understand Objects for the longest time. But such a simple explanation made it click right away!

  • @undrgrndhp
    @undrgrndhp Рік тому

    Great video, Thank you!

  • @Kirmo13
    @Kirmo13 Рік тому

    3:47 Why do you need to cast the instance if you just made sure that it's part of the DJ class?

    • @amyjen6934
      @amyjen6934 7 місяців тому

      So that you can compare the specific parameters or use methods of that specific class. If you don't cast the Object parameter to the specific type of your class, you would be limited to using methods and fields defined in the Object class itself.

  • @king0s
    @king0s Рік тому

    Clutter free high clarity explanation. Grateful for the video.

  • @bugaian
    @bugaian Рік тому

    Thanks.I had to mvn io.thorntail:thorntail-maven-plugin:2.3.0.Final:migrate-from-wildfly-swarm 00 for maven to compile it.

  • @ifstatementifstatement2704

    Whenever you plan to have different implementations of the methods of that abstract class.

  • @ifstatementifstatement2704

    Ok but what if someone creates a class that does not extend/implement the interface but yet implements their own version of those methods? Basically bypassing your interface/contract.

  • @justalilbit8887
    @justalilbit8887 Рік тому

    Btw, abstract class cannot be instantiated if there is any unimplemented abstract methods. But you can still put abstract keyword into a regular class that has no unimplemented methods will be instantiated. So, it's not related with having the keyword ABSTRACT but the Java concept. Just a reminder.

  • @proalexv
    @proalexv Рік тому

    Thank you so much, great video would recommend that when talking about the overriding you noted when as many for the attributes, would be helpful if you're example included multiple to see how it would be extended. Either way, great video!

  • @jondo-vh8tx
    @jondo-vh8tx Рік тому

    with all the respect: maybe removing that stupid disco backgroundssound will allow the viewer to focus on the explanation...

  • @satioOeinas
    @satioOeinas Рік тому

    This was very helpful! Thank you :)

  • @ngndnd
    @ngndnd Рік тому

    finally someone who explains this. Every video i see just explains the basics

  • @pimpvader2430
    @pimpvader2430 Рік тому

    Hi i hope somebody sees this because the video ist 7 Years old now. I am fairly new to Programming and my Question is why not just use an Interface? Why an abstract Class?

  • @anonmisfit
    @anonmisfit Рік тому

    very helpful! I still struggle with grasping where to actually use interfaces instead of classes in real projects. Sure you can define structures, but where do I actually NEED that? I'm working on a 9 year-old project - implementing interfaces now for old and established functionalities seems far too risky at this point, and like a potential chore going forward.

  • @fangzhenghu6479
    @fangzhenghu6479 Рік тому

    Thanks for the tutorial! Could you help explain why 100 is used to represent -4 instead of 4?

  • @elvenpath7
    @elvenpath7 Рік тому

    This is awesome. Thanks !

  • @TyButtery
    @TyButtery Рік тому

    Bro that mic on your gums?

  • @raaznak
    @raaznak Рік тому

    my right ear really enjoyed this vid

  • @andreviniciusbezerradasilv9335

    thank u

  • @StefanBanu
    @StefanBanu Рік тому

    Hi, I don't see the point on making the methods final? also the Intellij warns about removing the final from the method since already has "static". It cannot be overriden since it is static, so why the "final" ?

  • @ahitoFrede
    @ahitoFrede Рік тому

    Well formulated, easy and quick explanation. Better than my teacher did it :)

  • @KY-xz9yb
    @KY-xz9yb Рік тому

    sorry I believe you have a mistake, we cannot return in constructors.

  • @MHF-go9sd
    @MHF-go9sd 2 роки тому

    so efficient and useful, thank you

  • @manaduvortes2192
    @manaduvortes2192 2 роки тому

    Definitely worth a thumbs up. You just broke that down so easily. Thank you

  • @user-xb7rh1sd4f
    @user-xb7rh1sd4f 2 роки тому

    Great examples. Thank U

  • @imveryhungry112
    @imveryhungry112 2 роки тому

    Thank you sir im so stupid so im glad i have people like you to help me

  • @brunonegraozica5459
    @brunonegraozica5459 2 роки тому

    Won't "docker build" command build the "image" and not the "container"?