Java is "Strongly Typed"? - Here's What That ACTUALLY Means
Вставка
- Опубліковано 27 чер 2024
- You might know Java is strongly typed, but here's what that actually means.
☕ Java Course: codingwithjohn.thinkific.com/...
Everyone has heard that Java is "strongly typed", but not many people know what that actually means. Are other languages "weakly typed"? Why is Java like this, and why does it matter?
Learn or improve your Java by watching it being coded live!
Hi, I'm John! I'm a Lead Java Software Engineer and I've been in the programming industry for more than a decade. I love sharing what I've learned over the years in a way that's understandable for all levels of Java learners.
Let me know what else you'd like to see!
Links to any stuff in this description are affiliate links, so if you buy a product through those links I may earn a small commission.
📕 THE best book to learn Java, Effective Java by Joshua Bloch
amzn.to/36AfdUu
📕 One of my favorite programming books, Clean Code by Robert Martin
amzn.to/3GTPVhf
🎧 Or get the audio version of Clean Code for FREE here with an Audible free trial
www.audibletrial.com/johnclean...
📹Camera I use for recording:
amzn.to/3wlXcmR
🎙️Microphone I use (classy, I know):
amzn.to/3AYGdbz
Donate with PayPal (Thank you so much!)
www.paypal.com/donate/?hosted...
00:00 What is "Strong" Typing?
03:33 John uses Python???
06:09 JavaScript is WEAK
☕Complete Java course:
codingwithjohn.thinkific.com/...
codingwithjohn.com
4:00 The real historic event is camel case for a variable in Python.
The Java habits die hard
We're waiting for spring and spring boot tutorial
It's definitely something I use every day at work so I do aim to get to Spring eventually!
@@CodingWithJohn That would be AWESOME! Take care John!
Yes, we all want that
yes i am waiting for a spring and spring boot
❤❤❤❤yes, please! I looove your videos and your sense of humour!
Just to note, * operator is overloaded in python. Hence, 3 * "Burger" -> 'BurgerBurgerBurger'.
i accidentally enrolled in an intermediate java class right out of intro to programming last semester and this channel has been a HUGE help. thank you!
Showing proper examples of langauges that differ from Java (as opposed to just saying such exist) is a very good way to teach people something they may remember later once they start learning such a language. Thank you, awesome video as always.
In fact, you can multiply strings in python. this: print("hello" * 3), will print: "hellohellohello".
crazy.
bruh 😬💀
As a Java programmer beginner ,it is blowing up my mind.
What's great about Python though is that operations between types have to be explicitly defined, and the built-in cases are well-documented. Also, Python has operator overloading, so + and * don't necessarily mean add and multiply. They mean whatever they are defined to mean. In the case of sequences, these are referred to as the concatenation and repetition operators. This is not that different than how Java reuses the + character as a string concatenation operator.
It's a good thing you're back again. Hoping that you take care of yourself while teaching us. I've learned a lot from you, keep the good work!
i like u dude. you got me through java last semester. i’m staying subed until the end of time
I started learning Object oriented Java at Uni after Python. It took me 2 months to get around as its very different syntax and its idea on classes, objects etc. Now its a way of practicing it what we’ve learned so far. Glad to find your channel. Very informative videos. I will watch some previous uploads while I’m learning this language.
Love your explanations! Thanx a lot!
Its a very nice refresher.. also liked the way you presented the concept, thanks
Awesome as always! And thanks a lot for this new way of presenting info by comparing with similar implementation in other languages. Makes it really easy to understand. 😊
So funny, that you are taking the part of the compiler and shout out from that perspective 😂 - So: Funny & informativ, you cannot except more. ❤
Thanks John, this clears my doubt for so many years since school time.
You and your explanations are gold! Thank you so much!
More videos and more frequently John ! Fantastic explanation as always 😁
A spring boot series is so badly needed from you. Please make that possible, you made Java so welcoming and fun!
Really enjoy your videos. Would you ever consider creating some videos on the more common/useful Design Patterns? You have a knack for clearly explaining things, so these would probably help a bunch of people. Either way, thank you for sharing all of these great videos.
Strong type languages are much better that weak ones, do you remember those days at elementary school when the teacher told you to do not mix apples with oranges when doing some math operation? Well a compiler is that teacher preventing you from trying to add an array with a map entry (and returning and string, yes, I am watching at U Javascript)
Hi John. Your explaination in the sorting algorithm videos were so good. It would be great if you do a full DSA playlist.
Waiting
Dear John,
You have been an incredible source of inspiration and knowledge for me. Your passion for teaching and the way you convey complex ideas with such clarity and enthusiasm is truly remarkable. I am deeply grateful for your guidance and support. Thank you for being such an exceptional teacher and for making a positive impact on my life.
Warm Regards.
hey John !!! amazing work requesting you to create a spring framework course as well .
Congrats on 300K!!
Your explanation is awesomely clear, voice is crystal clear. Thank you so much John... (y)
Great video. I remember those crazy days, programming in pre-ANSI C language, without function prototypes, when the slightest modification to your code could lead to a real disaster.
Thank you so much for highlighting and explaining the nature and the importance of “type safety”.
I think that “null safety” is also fundamental; if you don’t have a video on that, you might as well consider the subject.
Obviously, type safety and null safety come at a cost: you need a good degree of expertise in software design, otherwise those features will seem more like a burden to you.
Why are Optionals so similar to WebFlux Mono ?
thank you, super clear and enjoyable video!
I love your style.
You just boil it down to the bare necessities and characterize different programming languages so vividly.
First video I have seen from you, and definitely not the last. I'm glad I have found your channel.
As a passionate software developer I am fairly confident in my skills, but the term 'Strongly Typed' remained a mystery to me for a long time. I have felt intrigued if different developers used that term confidently, but I never fully understood its meaning.
Half way through your explanation, I understood it in a way that I could imagine myself explaining it the very next day to others.
Even the people commenting here seem to be very cool and supportive.
Good stuff.
Loved the Quesadilla, Puppy and Burger references, makes learning much more fun, could you also make a video on Weak and Strong references? Thanks
A moment of Epiphany - It finally made sense to me as to why I love both cats and Java 😂
This is entertaining despite knowing all of this, good job man :D
Hi John ...yours videos really help me alot .. I have 1 request Can you please make whole JAVA concepts ?
Your channel is underrated. Thanks a lot!
Great video Jhon!
Thank you 😄. I learn something new about Java and Javascript.
Nice, now i know what that means. Hey John, can you give a little explanation about standard folder structure in Java desktop applications? Like Spring boot folder structure which classes are organized in every folder like DTO, MODEL, SERVICE etc. I'm just really confused where to put my files or organize them. Thank you.
Common Lisp (Steel Bank) is a dynamic strongly typed compiled language that doesn't crash on error it stays up and gives you an opportunity to correct the error and then continues. It doesn't just compile once, you actually program it while it runs and it compiles to machine code per function as soon as it gets a new/updated function definition. Pretty cool technology but I'm glad it's not popular because people would ruin it like they did with super popular languages.
Your explanations are just amazing... I'm 12 years experienced Java developer. But still I am having fear about Data structures and algorithms which is blocking me to get selected in product based companies. So please start DSA playlist...
John your methods of teaching are amazing :))
Thanks, now I know more about Java. When I go bald like every person who learns it, I will thank you again.
Hi John,
Can you please explain about serialization and Deserialization topic
Woww, new camera?! Great job John🎉
Same camera as the last year or so of videos, but had to record in a different room because of a bunch of water damage in the one I usually use
Explain the
1. Difference between Java 8 version and other Versions of Java
2. What is Memory Management and what are it's type
3. Difference between JDK,JRE,JVM
4. Why Java is partially OOP Language
5. What is Lambda Expression and how to use it
6. Difference between Abstraction and Interface
Thank you infinitmy for all your videos and the sincere way you explain and facilitate the understanding, thank you again Mr John
Great video!
Great video with so funny expressions haha, thank you so much
You should do a mini series on popular Java libraries and how to work with them
hey, Which theme of eclipse you are using?
Actually, Python can do static types now as part of its new gradual type system. And Java can permissively do integer + string. And it's possible to have a statically typed language that isn't manifestly typed, like Haskell.
Hey nice Videos, Streams in Java would be a cool next Video.
Hi John. Thank you for all your good videos. I am a Python developer and new to Java. I found Java API docs too ambiguous and uncomfortable for me, at least as a newcomer. Can you please make a video about how to read and work with Java API documentation?
Hi John, is there possiblity u could explain relation of webpage vs java package and server side. Like overall picture of doing webpage
Hi John, I believe you haven't discussed switch expression vs switch statement. Can you elaborate on the topic?
How often do you think about 3:45?
Love your way of presenting this😂
what do you think about Quarkus framework?
Please do tutorial for access modifiers in java
Pure gold!
simply awesome
Bro you rock!
Please please please do a tut on iterators 🙏🙏
Love the jokes in your content, totally makes my day
Fun n interesting way of learning
Great!
Isn't Javascript being front-end is trying is trying to emulate stability?
it feels like looking at some standup comedy while learning at the same time keep up the good work
Loved the programming languages analogy to animals 😂
The historic date when the video of John coding in python was uploaded in this channel happens to be my birthday.
I loved this. After developing in Java for a long time, I was put on a project written in ("Whacky Crap") React. OMG and Holy Bleep! I'm heading back to a Java project and I have one big sigh of relief.
I've just imagined a personification of mr. Java giving me "that" stare when I wanted.... juuuust wanted to... maybe for a joke... or a cheap laugh... only suggest to try just once, a "burger" multiplication by 3.
And you know, that thought gave a chill, sent shivers down my spine, and now my body is aching all the time! 😉😁
Great video John! Lots of laughs! Loved it! ❤😊
Now I can do my work - resolve issues after not very well thought out branch merge of Java code - with a badass smile on my face. 😎
We miss you man
Java and JavaScript are like 2 brothers, one very old and grumpy but gets the job done while the younger one is much more of a happy go lucky type and just giving everything a shot, you guess which is which 😂
I’ve been a software engineer for 40 years. Primarily worked in C for the first half of my career, mostly Java for the past 15. (And I’ve been forced to do some JavaScript, but I really don’t want to talk about it.) John, your videos have often given me ideas for interview questions and a few times led me to reconsider language features in a way I hadn’t before. I recognize your professionalism and greatly respect your dedication to your craft. But this was the first of your many videos that contained an insight so novel and penetrating that I nearly dropped my phone. Yes, JavaScript is a dog of a language while Java is a cat. Now I just have to figure out which animal represents C.
oh wow. you must have been my colleague. C for 20 years, then Java .....with some JS. lol
The animal for C is definitely the cockroach.
It lurks in all the deep, dark, damp corners of our computers and is impossible to kill. 😂
I know you're busy but please make weekly tutorials.
super!
absolutely legend
java is strongly typed language since it strictly enforces data types of variables at compile time itself. python is dynamically typed language since it allows changing data type of variables, but isn't weakly typed at all since it does fail at 3 + "burger" but at runtime. javascript is weakly typed since it'll always try to find an answer to various operations like 3 + "burger" will give "3burger"
LoL You made my day!
please java iterator tutorial
Waiting for spring and spring boot tutorials
Bro I hava a qn
Is javafx worth learning?
Nice video
which version of java this video is based on?
Could be any version between 11 and 21
Broo i really enjoyed that content. "What in the world? do you want me to compile 3 * "Burguer"? Hell nah", hahaha awesome, i love Java
at 5:21 you say this won't compile in Java, but iirc Java would cast the int to a string and concatenate both strings. I think your statement is correct in most cases, but this specific example doesn't really show that.
True! There are cases like that where Java will autoconvert, almost always with strings. I also learned after making this video that Python does string multiplication. So it would literally print out "BurgerBurgerBurger". Tough to come up with exact clear examples to showcase the principles of each language sometimes
He said the word with "P" :O
Oh! The horror
Yeah, that looks a lot like "statically typed" not "strong typed". If it was strongly typed, you could say "not only is this an int but it's values can only be 1,2,5 and 7"... that'd be STRONG typing.
All things about javascript you just said 😂😂😂. So damn true!!!
subscribed
Iconic ❤
Hello sir is java still worth learning? It's my first month in java, and I keep seeing comments that we should start learning python instesd
Don't even listen to such comments. Think about it. What's your purpose? Languages are tools and we don't make decisions based on tools. Like if I have a syringe then I should become a doctor and study medical stuff. Or I have wrench then based on that I have a wrench I must become a car mechanic. You select your tools based on your decision not vice versa. I want to be a data scientist so I'm going to select Python. I want to write Android apps or stand-alone apps or server/client side, writing them once and running them everywhere so I'll choose Java. I want to be an embedded or driver developer so I'll choose C/C++/Rust. That's how you should choose your tools. Based on your goal and target. And if you are concerned about income salary and job future, I have to say AFAIK Java is one of the most enterprise/industrial languages out there if not the most used one. Industry changes very slowly because of the costs, consistency and their size. They don't change something that's working. For example, think about big companies like IBM, RedHat, Microsoft and many more. If they change their mind to replace a language with another, it costs millions of work hours to replace millions of lines of codes. Also, such a change requires tons of hours of training for that business. And you guess the next. Maintaining those codes requires programmers.
@@hoshyarkarimi Wowww thank youuuuuu so much for thiss😍😍 now I'm more dedicated to proceed in java, since I would love to make applications
Its a good thing since it means java is very strong 😅💪💪🔥
3 * "Bugger" is not "3 Burgers" in Javaacrript?
8:00 I hoped for "BurgerBurgerBurger"
that's what Python would do
is ur java course free?
That's probably just my noob has-only-really-coded-in-java ass speaking, but dynamic typing seems like such a mess. Why would you willingly do that to yourself, not using the strong safety net that is static typing, and instead having to deal with those kinds of errors?
💪
"Okay. I did my very best to multiply 3 * Burger, but because nothing made sense and it was pretty much impossible, I just came up with NaN. But I didn't throw any exceptions. Are you proud of me?" - JavaScript
"John codes in python" 😂😂😂
Also SOLID principles, Clean Code from your perspective.