Java is "Strongly Typed"? - Here's What That ACTUALLY Means

  Рет қаралды 37,400

Coding with John

Coding with John

Күн бұрын

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

Пікірлер: 158
@jayros4269
@jayros4269 4 ай бұрын
4:00 The real historic event is camel case for a variable in Python.
@CodingWithJohn
@CodingWithJohn 4 ай бұрын
The Java habits die hard
@rayenmerghmi5664
@rayenmerghmi5664 4 ай бұрын
We're waiting for spring and spring boot tutorial
@CodingWithJohn
@CodingWithJohn 4 ай бұрын
It's definitely something I use every day at work so I do aim to get to Spring eventually!
@dmax7400
@dmax7400 4 ай бұрын
@@CodingWithJohn That would be AWESOME! Take care John!
@AnantaAkash.Podder
@AnantaAkash.Podder 3 ай бұрын
Yes, we all want that
@radosny3279
@radosny3279 3 ай бұрын
yes i am waiting for a spring and spring boot
@katiaobraztsova7582
@katiaobraztsova7582 3 ай бұрын
❤❤❤❤yes, please! I looove your videos and your sense of humour!
@DekelGilboa-pv2je
@DekelGilboa-pv2je 3 ай бұрын
In fact, you can multiply strings in python. this: print("hello" * 3), will print: "hellohellohello".
@donwinston
@donwinston 3 ай бұрын
crazy.
@KABKAKIy_KAPATEJI_DOP
@KABKAKIy_KAPATEJI_DOP 3 ай бұрын
bruh 😬💀
@KABKAKIy_KAPATEJI_DOP
@KABKAKIy_KAPATEJI_DOP 3 ай бұрын
As a Java programmer beginner ,it is blowing up my mind.
@atrus3823
@atrus3823 Ай бұрын
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.
@wurlmon5191
@wurlmon5191 3 ай бұрын
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.
@anuragbisht1200
@anuragbisht1200 3 ай бұрын
Just to note, * operator is overloaded in python. Hence, 3 * "Burger" -> 'BurgerBurgerBurger'.
@caml1720
@caml1720 3 ай бұрын
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!
@jasperblase1374
@jasperblase1374 3 ай бұрын
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!
@hennesseylei7398
@hennesseylei7398 4 ай бұрын
i like u dude. you got me through java last semester. i’m staying subed until the end of time
@anpadjahil9711
@anpadjahil9711 3 ай бұрын
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. 😊
@shrikanthhandadi1783
@shrikanthhandadi1783 4 ай бұрын
Its a very nice refresher.. also liked the way you presented the concept, thanks
@bydanap
@bydanap 3 ай бұрын
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.
@scott_parker
@scott_parker 4 ай бұрын
Love your explanations! Thanx a lot!
@BD-1989
@BD-1989 Ай бұрын
So funny, that you are taking the part of the compiler and shout out from that perspective 😂 - So: Funny & informativ, you cannot except more. ❤
@miqueldebon5851
@miqueldebon5851 4 ай бұрын
You and your explanations are gold! Thank you so much!
@paulchuang9247
@paulchuang9247 3 ай бұрын
Thanks John, this clears my doubt for so many years since school time.
@paoloa89
@paoloa89 3 ай бұрын
More videos and more frequently John ! Fantastic explanation as always 😁
@megasusmegajos4321
@megasusmegajos4321 2 ай бұрын
Why are Optionals so similar to WebFlux Mono ?
@paarsaJam
@paarsaJam 4 ай бұрын
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.
@levon9
@levon9 3 ай бұрын
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.
@chrisgio8439
@chrisgio8439 4 ай бұрын
Congrats on 300K!!
@davidgrajalesmirage
@davidgrajalesmirage 3 ай бұрын
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)
@ArjunKumar-zu2kl
@ArjunKumar-zu2kl 4 ай бұрын
Your explanation is awesomely clear, voice is crystal clear. Thank you so much John... (y)
@balaganesharuna5109
@balaganesharuna5109 Ай бұрын
Hi John. Your explaination in the sorting algorithm videos were so good. It would be great if you do a full DSA playlist.
@7tharan
@7tharan Ай бұрын
Waiting
@Alcatraz-23
@Alcatraz-23 2 ай бұрын
A spring boot series is so badly needed from you. Please make that possible, you made Java so welcoming and fun!
@aidoka2000
@aidoka2000 3 ай бұрын
John your methods of teaching are amazing :))
@csanid1
@csanid1 3 ай бұрын
thank you, super clear and enjoyable video!
@Hayato1533
@Hayato1533 3 ай бұрын
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.
@SUMITYADAV-cy9hf
@SUMITYADAV-cy9hf 3 ай бұрын
hey John !!! amazing work requesting you to create a spring framework course as well .
@codeZarathustra
@codeZarathustra 3 ай бұрын
Great video Jhon!
@poststuff172
@poststuff172 4 ай бұрын
Your channel is underrated. Thanks a lot!
@giorgiobarchiesi5003
@giorgiobarchiesi5003 3 ай бұрын
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.
@pinolskun8764
@pinolskun8764 4 ай бұрын
This is entertaining despite knowing all of this, good job man :D
@ShailjaGautam-pv3px
@ShailjaGautam-pv3px 3 ай бұрын
Hi John ...yours videos really help me alot .. I have 1 request Can you please make whole JAVA concepts ?
@Crystal_error404
@Crystal_error404 3 ай бұрын
Thank you 😄. I learn something new about Java and Javascript.
@DavidParathyras
@DavidParathyras 3 ай бұрын
Great video!
@diegoramos27
@diegoramos27 3 ай бұрын
Loved the Quesadilla, Puppy and Burger references, makes learning much more fun, could you also make a video on Weak and Strong references? Thanks
@fadigatoule7231
@fadigatoule7231 2 ай бұрын
Thank you infinitmy for all your videos and the sincere way you explain and facilitate the understanding, thank you again Mr John
@junyorff12
@junyorff12 4 ай бұрын
Woww, new camera?! Great job John🎉
@CodingWithJohn
@CodingWithJohn 4 ай бұрын
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
@sagarshah3647
@sagarshah3647 4 ай бұрын
A moment of Epiphany - It finally made sense to me as to why I love both cats and Java 😂
@janndervinribleza56
@janndervinribleza56 2 ай бұрын
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.
@aishwaryah1981
@aishwaryah1981 Ай бұрын
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
@LyTu-xw7od
@LyTu-xw7od Ай бұрын
Great video with so funny expressions haha, thank you so much
@hoshyarkarimi
@hoshyarkarimi 3 ай бұрын
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?
@7tharan
@7tharan Ай бұрын
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...
@harshpatidar7078
@harshpatidar7078 3 ай бұрын
hey, Which theme of eclipse you are using?
@muthukrish5408
@muthukrish5408 3 ай бұрын
Hi John, Can you please explain about serialization and Deserialization topic
@khattami240193
@khattami240193 Ай бұрын
Hi John, I believe you haven't discussed switch expression vs switch statement. Can you elaborate on the topic?
@patiwindsend675
@patiwindsend675 2 ай бұрын
Hey nice Videos, Streams in Java would be a cool next Video.
@nurasilah3786
@nurasilah3786 Ай бұрын
Hi John, is there possiblity u could explain relation of webpage vs java package and server side. Like overall picture of doing webpage
@mizaelgaytan7109
@mizaelgaytan7109 3 ай бұрын
Thanks, now I know more about Java. When I go bald like every person who learns it, I will thank you again.
@vesakk72
@vesakk72 4 ай бұрын
Pure gold!
@nxthingbutv0id958
@nxthingbutv0id958 Ай бұрын
You should do a mini series on popular Java libraries and how to work with them
@MrPlaybook
@MrPlaybook 2 ай бұрын
Bro you rock!
@mrooglyboogie4118
@mrooglyboogie4118 Ай бұрын
Love the jokes in your content, totally makes my day
@PixelOutlaw
@PixelOutlaw 3 ай бұрын
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.
@a7mdbest15
@a7mdbest15 3 ай бұрын
Love your way of presenting this😂
@danielstromberg
@danielstromberg 3 ай бұрын
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.
@ramkumar_balu
@ramkumar_balu Ай бұрын
simply awesome
@user-vs6hs4ih9j
@user-vs6hs4ih9j 3 ай бұрын
Fun n interesting way of learning
@cypherliquid
@cypherliquid 3 ай бұрын
what do you think about Quarkus framework?
@MrGIOVANOTTI
@MrGIOVANOTTI 3 ай бұрын
Great!
@Pacvalham
@Pacvalham 4 ай бұрын
How often do you think about 3:45?
@HeyLee.
@HeyLee. Ай бұрын
Please do tutorial for access modifiers in java
@cirodirosa6752
@cirodirosa6752 4 ай бұрын
Isn't Javascript being front-end is trying is trying to emulate stability?
@rayana2344
@rayana2344 2 ай бұрын
Please please please do a tut on iterators 🙏🙏
@jaybrass9259
@jaybrass9259 3 ай бұрын
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.
@dennismuller1141
@dennismuller1141 3 ай бұрын
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.
@CodingWithJohn
@CodingWithJohn 3 ай бұрын
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
@marekoko2083
@marekoko2083 3 ай бұрын
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. 😎
@vladimirgorlin7510
@vladimirgorlin7510 3 ай бұрын
super!
@roel455
@roel455 3 ай бұрын
Nice video
@pradyumn2692
@pradyumn2692 2 ай бұрын
The historic date when the video of John coding in python was uploaded in this channel happens to be my birthday.
@maximilianschon1503
@maximilianschon1503 4 ай бұрын
absolutely legend
@spidysense7754
@spidysense7754 3 ай бұрын
Bro I hava a qn Is javafx worth learning?
@mohammadobeidat5685
@mohammadobeidat5685 3 ай бұрын
Iconic ❤
@andres98
@andres98 3 ай бұрын
Loved the programming languages analogy to animals 😂
@sureshmanne7245
@sureshmanne7245 4 ай бұрын
which version of java this video is based on?
@davidgrajalesmirage
@davidgrajalesmirage 3 ай бұрын
Could be any version between 11 and 21
@broyea6943
@broyea6943 3 ай бұрын
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
@hoshyarkarimi
@hoshyarkarimi 3 ай бұрын
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.
@broyea6943
@broyea6943 3 ай бұрын
@@hoshyarkarimi Wowww thank youuuuuu so much for thiss😍😍 now I'm more dedicated to proceed in java, since I would love to make applications
@TheMoviemaker98
@TheMoviemaker98 3 ай бұрын
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 😂
@ahmadiyad2860
@ahmadiyad2860 3 ай бұрын
We miss you man
@RJNoe
@RJNoe 4 ай бұрын
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.
@stephanieezat-panah7750
@stephanieezat-panah7750 3 ай бұрын
oh wow. you must have been my colleague. C for 20 years, then Java .....with some JS. lol
@tipeon
@tipeon 3 ай бұрын
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. 😂
@knowledgeseeker2452
@knowledgeseeker2452 3 ай бұрын
subscribed
@allan30nic32
@allan30nic32 3 ай бұрын
LoL You made my day!
@shahabshafiee3333
@shahabshafiee3333 4 ай бұрын
I know you're busy but please make weekly tutorials.
@divyanshusingh6473
@divyanshusingh6473 3 ай бұрын
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"
@carscupcake
@carscupcake 4 ай бұрын
He said the word with "P" :O
@housemajaliwa
@housemajaliwa 4 ай бұрын
Oh! The horror
@user-lw1dd4md5o
@user-lw1dd4md5o 3 ай бұрын
Great job
@evantran161
@evantran161 2 ай бұрын
please java iterator tutorial
@rodrigomarques1633
@rodrigomarques1633 3 ай бұрын
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
@tahiriqbal2447
@tahiriqbal2447 3 ай бұрын
Waiting for spring and spring boot tutorials
@GameTornado01
@GameTornado01 4 ай бұрын
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?
@chiragsuthar9315
@chiragsuthar9315 4 ай бұрын
All things about javascript you just said 😂😂😂. So damn true!!!
@chiragsuthar9315
@chiragsuthar9315 4 ай бұрын
"John codes in python" 😂😂😂
@0x000B
@0x000B 4 ай бұрын
Its a good thing since it means java is very strong 😅💪💪🔥
@derto8i271
@derto8i271 3 ай бұрын
8:00 I hoped for "BurgerBurgerBurger"
@dennismuller1141
@dennismuller1141 3 ай бұрын
that's what Python would do
@user-fh1mx6pz3r
@user-fh1mx6pz3r 3 ай бұрын
is ur java course free?
@walterbushell7029
@walterbushell7029 3 ай бұрын
3 * "Bugger" is not "3 Burgers" in Javaacrript?
@edgeeffect
@edgeeffect 3 ай бұрын
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.
@ThatGuyMwangangi
@ThatGuyMwangangi 3 ай бұрын
"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
@johnmorrison2645
@johnmorrison2645 3 ай бұрын
Python variables have no type. It is objects in Python that harbor type. Python is dynamically but strongly typed.
@_abdul
@_abdul 4 ай бұрын
Java and JavaScript are as closely related as Car and Carpets.
@Pacvalham
@Pacvalham 4 ай бұрын
also cat and caterpillar
Static vs Non-Static Variables and Methods In Java - Full Simple Tutorial
11:29
Vectors in Java: The 1 Situation You Might Want To Use Them
16:13
Coding with John
Рет қаралды 75 М.
Bro be careful where you drop the ball  #learnfromkhaby  #comedy
00:19
Khaby. Lame
Рет қаралды 39 МЛН
Miracle Doctor Saves Blind Girl ❤️
00:59
Alan Chikin Chow
Рет қаралды 35 МЛН
КАКОЙ ВАШ ЛЮБИМЫЙ ЦВЕТ?😍 #game #shorts
00:17
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 587 М.
Hidden Beauties of Java Enums
22:20
Frank Delporte
Рет қаралды 10 М.
New Java Version 22 - The 3 Best New Features You'll ACTUALLY Use
13:15
Coding with John
Рет қаралды 82 М.
Java's Creators Rejected Multiple Inheritance - Here's Why
13:14
Coding with John
Рет қаралды 66 М.
Optionals In Java - Simple Tutorial
15:53
Coding with John
Рет қаралды 194 М.
5 Uncommon Python Features I Love
15:09
Indently
Рет қаралды 124 М.
How do computers read code?
12:01
Frame of Essence
Рет қаралды 3 МЛН
My Unconventional Coding Story | Self-Taught
27:14
Travis Media
Рет қаралды 533 М.
Set and HashSet in Java - Full Tutorial
20:43
Coding with John
Рет қаралды 191 М.
Bro be careful where you drop the ball  #learnfromkhaby  #comedy
00:19
Khaby. Lame
Рет қаралды 39 МЛН