-you can extend a class funtionality in Java. -the code isn't complex or longer from using getter or setters. That's encapsulation, and you can do it in Kotlin too. It's not a language feature but a methodology of OOP. -then It rants about java being verbose and longer for writting than Kotlin. but shows a manifest xml file. That you also would have to use in Kotlin.
"you can extend a class functionality in Java" You can only create static functions or subclasses in Java. With Kotlin you can write extension functions directly on an existing class, which comes in handy in numerous places where subclassing would be cumbersome (perhaps special functionality on the Android TextView). The last point about the verbosity is true. I caught that in the video too and when I saw XML it gave me a good laugh.
He also mention verbosity which actually turns out to be healthier for my brain than I expected. He also mention performance, like, is Java slower than Kotlin?
@Jappleng I understand where you're coming from, and I have less experience than you (still quite a bit though, Java has been my main programming language for a few years now), but I think you're underestimating Kotlin. While Java's syntax is certainly familiar, it's very rigid and repetitive. Kotlin implements more modern syntax features that deviate from the traditional c-style, and tbh I kinda dig it. Ofc both languages compile to the same bytecode so this isn't really a huge deal, plus any library written in Kotlin is backwards compatible with Java and vice versa, so like you said it's really just a preference thing. Android development certainly is comically messy though lol, and Google's lack of any semblance of support for developers is downright astonishing.
@Jappleng I think what they ment by unsecure and secure is that In java, public variable are unsecured and it's why we just do a private variable with getter and setter, it makes it safe In Kotlin however, a public variable is in reality a java private variable with getter and setter included, this is safer since you can never have unsecure public values (also no identifier just turns it public by default) Kotlin's protected changes the variable's getter/setter method to be protected and private just creates none So Java is safe, Kotlin is safer, that's what they ment, but this channel seems like they know nothing since they showed an XML file instead of Java code which is idiotic cause Kotlin would also use the very same XML file
@@lewisayers5983 or you could also use your IDE's shortcut as all the programmers do and autogenerate getters and setters pressing 2 bottons in 1 ms...
The fight between Google and Oracle, and especially Google's ego towards Oracle has led to slow adoption of new Java LTS versions in Android. If JDK 17 is done today, it will be awesome to write Java code. As regards to KOTLIN, I am Java developer, I love Java programming very much. And I am learning Kotlin for quite few weeks. I think rather than Java vs Kotlin, Java + Kotlin is really damn powerful than any combo. The best of both worlds in every project is a guarantee of success. Also, I am liking Kotlin and its style of writing code. But not at the cost of Java, but alongside Java. I would say a Java developer should learn Kotlin, and vice-versa. It will give them the most powerful tools to write and develop.
Absolutely! Learning both Java and Kotlin gives you a powerful toolkit for development. Their combination offers the best of both worlds, enhancing flexibility and efficiency in projects. Happy coding!
I've done many languages and when he said "Java is easy to learn", I almost had a heart attack.....I some how pick other languages so fast...but java, NO
Started with python for a few weeks, until i heard about java really hard and whatever And when i got my hand on java Im shocked, cuz in my eyes java is just a python with longer syntax
Less code is always better, and anything missing from a new language is usually implemented over time. I really hope Kotlin removes the Javascape from existence for anything but legacy.
4:48 "Data Class" is a "smell code" (Martin Fowler - Refactoring), it produces a non-cohesive class. Both exaples "smells" but i see a pro in java, if the "smell code" is textual you can recognize it better. Also, i think the type sistem is your friend. Gives you control and security in your desing and development process. :)
Good day👋! If you use Kotlin with JVM as a target to run applications, then yes. But Kotlin can be used to write programs with compiling to JavaScript or Native. And these cases ver different from JVM target
Great video! It's interesting with how far behind Android is when it comes to Java. Only just recently had it supported JDK 11. This is probably another reason as to why Kotlin is preferred by Google. It provides more powerful language features SOONER than Java even though later versions of Java now support similar things (lambdas for example).
Definitely give Kotlin a try. I'm having fun learning Kotlin on JetBrains (the developer behind Kotlin) as my first programming language and about to complete my third project in less than a month in. I tried to learn C++ and Java in the past and struggled.
for those complaining, java is really easy to learn, you learn about OOP and advanced concepts in a really easy and high level way. if you start with somethig like python it'll be harder to learn other languages and you'll lack many things
Kotilin is just child of legal issues between Oracle and Google and Java source code. I don't see any benefits using Kotlin over Java. Maybe some things u can write in less code. Compose is disaster for complex ui. (My personal experience)
Java is far more better then kotlin. Google just made kotlin as official language because of the partnership with jetbrain (Inventor of kotlin and Android studio)
Yes, pretty easy. Compare to C/C++ where Java was inspired from! C/C++ has pointers (Java doesnt), multiple inheritance (Java doesnt), lack of dynamic memory allocation (Java doesnt), lack of automatic garbage collector (Java doesnt)... And you say that Java isnt easy?! C'mon!
One of the biggest eCommerce in Europe is written mostly in Kotlin nad Java. ( about 1000 microservices in Kotlin ) JIT can optimize Java code much better than static compilers
Java is very good to build up OOP knowledge (don't blame NPE, that means your design has flaws), Kotlin has some handy features (like coroutines and data class as mentioned in the video), that is fun to write but confusing to read sometimes.
Lol we all know that NPE is a developers mistake but it is called a million dollar mistake for a reason if Kotlin can solve this thing to an extent by giving compile time errors then it's a win situation for the developers . Plus your comment sounds idiotic when you are saying Kotlin is confusing in terms of readability. Kotlin is not confusing it's you who are struck with java long syntax that you can't understand the readability and conciseness of Kotlin Syntax. The Kotlin code is clean and readable at the same time...
Great video! Would help to explain the usual pronunciation of words in the context of code (e.g. "record", which was pronounced like in "I'll _record_ something" instead of like in "a music _record_"). I think saying it in the correct way makes developers feel more at home. Edit: Just by looking at your content both here and your page anyone can see the attention to every detail, great job! Slava Ukraini
I'd be surprised if the speaker isn't just reading from a script and has any idea of what he's talking about. They'll often say a simple word when it would have been an easy place to elaborate on what it means, e.g. "in Kotlin, it's a lot easier" 🔚, "that is coroutines" 🔚. Or they emphasize the wrong word: "it *is* considered an object". Or pronounce the word wrong like how they said "inference" like "interference" just without the "ter"
//code conciseness public class Person { //"plain old data" version of Person public String name; //make everything public because OOP introduces tradeoffs for zero gain public int age; //original uses string type for age for who knows what reason, maybe only kotlin has an int type? }
Java supports RECORDS. Just because Android doesn't support java RECORD and Kotlin automatically generates the boilerplate code, is it a problem of Java or Android? And since Android ecosystem is a Google's child, same as the choice of Kotlin being default language in AndoridStudio, then doesn't it look like there is artificial fight with java by not implementing the higher versions and features of java properly? Someone wants to have monopol over the whole Android, and that's where kotlin kicks in. Java is also very concise, especially newer versions. You say java java don't have automatic type inference, well maybe on Android it is another feature that is fighted with, but java has "var" since long time now, funny that in 2022 you still enumerate it as a Kotlin advantage over java. And you said that java is not secure, and that Kotlin can laverage the libraries of java becuases uses JVM - this implies that Kotlin can't be more secure than java. And the point about java allowing "null", well, to me it is very unwise to point this as any advantage or disadvantage of one language over another - this whole "null" thing is artficial problem of people not understanding the languge, the null thing can't really be reasonably opted out, every solution to this introduces additional level of complication, because in Object Oriented programming the concept that the referenced object is not existing which is the concept of "null" is like the concept of "zero" in math is part of the world, and so we should have Optional for zero, because dividing by 0 can cause RuntimeException? No, imagine the readablity of code checking before every divison - that would be a mess and a bugs cradle - the program needs to be designed that where there can't be zero, there is no zero, and where there can't be null, there is no null, the programmer is responsible (proper code, proper tests, documentation etc...). In java you have the Optional type where you can return some object instead of null, but I never saw a scientifically conducted examination stating that the lack of null in language is better than having it, especially to prove that it improves code readability, lowers the bugs rate etc, actually what I've found is the the more complex the code, the more fancy ideas there is more bugs, and that's it. KISS
You never wrote something in Kotlin. You didnt understood the null concept of kotlin. Why do write a wall of opponion to something you dont understand?
@@Krzys6301 Flatearthers also have their own opinion. I had an argument and its all needed. You didnt understand the null concept in Kotlin. You even dont know that there is also null in Kotlin. Therefore, all of your "opinion" is wrong, because its based on untruth.
@@Jelvix Ye I learned Kotlin cause I felt like making minecraft mods in another language to be honest. Thanks to ShadowFacts, that's possible using their API.
Do you expect Kotlin to replace Java so soon? Let's discuss whether this claim holds true...🫡
-you can extend a class funtionality in Java.
-the code isn't complex or longer from using getter or setters. That's encapsulation, and you can do it in Kotlin too. It's not a language feature but a methodology of OOP.
-then It rants about java being verbose and longer for writting than Kotlin. but shows a manifest xml file. That you also would have to use in Kotlin.
"you can extend a class functionality in Java"
You can only create static functions or subclasses in Java. With Kotlin you can write extension functions directly on an existing class, which comes in handy in numerous places where subclassing would be cumbersome (perhaps special functionality on the Android TextView).
The last point about the verbosity is true. I caught that in the video too and when I saw XML it gave me a good laugh.
@@zacharylippard2994 subclases. Yes. It ain't cumbersome. But yes. I get it. In kotlin is even easier to extend it on the spot.
He also mention verbosity which actually turns out to be healthier for my brain than I expected.
He also mention performance, like, is Java slower than Kotlin?
Dude 4:49
I so know right? He showed cons of java then said Kotlin is easier and didnt show any how or why.
Bruh,
2:22 : "Java is verbose and requires more lines of code!"
*shows XML*
@Jappleng I understand where you're coming from, and I have less experience than you (still quite a bit though, Java has been my main programming language for a few years now), but I think you're underestimating Kotlin. While Java's syntax is certainly familiar, it's very rigid and repetitive. Kotlin implements more modern syntax features that deviate from the traditional c-style, and tbh I kinda dig it. Ofc both languages compile to the same bytecode so this isn't really a huge deal, plus any library written in Kotlin is backwards compatible with Java and vice versa, so like you said it's really just a preference thing.
Android development certainly is comically messy though lol, and Google's lack of any semblance of support for developers is downright astonishing.
@Jappleng I think what they ment by unsecure and secure is that
In java, public variable are unsecured and it's why we just do a private variable with getter and setter, it makes it safe
In Kotlin however, a public variable is in reality a java private variable with getter and setter included, this is safer since you can never have unsecure public values (also no identifier just turns it public by default)
Kotlin's protected changes the variable's getter/setter method to be protected and private just creates none
So Java is safe, Kotlin is safer, that's what they ment, but this channel seems like they know nothing since they showed an XML file instead of Java code which is idiotic cause Kotlin would also use the very same XML file
@@TBiscuit1 for the getters and setters, you could always use lombok to get the same safety and conciseness
@@lewisayers5983 Yeah that thing is great!
@@lewisayers5983 or you could also use your IDE's shortcut as all the programmers do and autogenerate getters and setters pressing 2 bottons in 1 ms...
The fight between Google and Oracle, and especially Google's ego towards Oracle has led to slow adoption of new Java LTS versions in Android. If JDK 17 is done today, it will be awesome to write Java code.
As regards to KOTLIN, I am Java developer, I love Java programming very much. And I am learning Kotlin for quite few weeks. I think rather than Java vs Kotlin, Java + Kotlin is really damn powerful than any combo. The best of both worlds in every project is a guarantee of success. Also, I am liking Kotlin and its style of writing code. But not at the cost of Java, but alongside Java.
I would say a Java developer should learn Kotlin, and vice-versa. It will give them the most powerful tools to write and develop.
Absolutely! Learning both Java and Kotlin gives you a powerful toolkit for development. Their combination offers the best of both worlds, enhancing flexibility and efficiency in projects. Happy coding!
I've done many languages and when he said "Java is easy to learn", I almost had a heart attack.....I some how pick other languages so fast...but java, NO
For a c++ developer, learning Java is the simplest thing. However, Java developers will have a steep learning curve to write code in cpp
I started with C++ and then Java. If u started with those 2 languages, no other language can be difficult to learn.
@@AminAramoon so true once you learned c++ , java is literally a breath of fresh air
if Java is hard for you, then which language is easier to learn? name it, please :) and what exactly was easier?
Started with python for a few weeks, until i heard about java really hard and whatever
And when i got my hand on java
Im shocked, cuz in my eyes java is just a python with longer syntax
We are currently learning Android development using Kotlin at my college!
Great
The best part of Java is the JVM. Compiling Java to native code with GraalVM is just awesome.
Yes like Kotlin !
3:40 in newer versions of java you can do "if(object instanceof String string) {return string.length();}". Little alternative
I'm trainee in mobile application development for Android and this is the most helpful video I've seen in the past month.
I think that kotlin was made to replace java
Less code is always better, and anything missing from a new language is usually implemented over time. I really hope Kotlin removes the Javascape from existence for anything but legacy.
Thanks for the video. FYI the narration mispronounce many cs terms
4:48 "Data Class" is a "smell code" (Martin Fowler - Refactoring), it produces a non-cohesive class. Both exaples "smells" but i see a pro in java, if the "smell code" is textual you can recognize it better.
Also, i think the type sistem is your friend. Gives you control and security in your desing and development process. :)
1:50. Java is easy to learn as it has a simple syntax. Said the guy who invented the Chinese language.
Kotlin: Code conciness!
Java: Did you heard about Lombok?
And so on...
@Miracle oh, man. Many interesting things are waiting you :)
For beginning: "Java" is not only island and kind of tea.
how to spot an inexperienced programmer
so, kotlin lacks in performance like java?
Good day👋!
If you use Kotlin with JVM as a target to run applications, then yes.
But Kotlin can be used to write programs with compiling to JavaScript or Native. And these cases ver different from JVM target
Only compilation performance. It compiles to JVM just like Java does, so run time performance is the same
Good video! What's your thought about flutter for mobile development ?
Great video! It's interesting with how far behind Android is when it comes to Java. Only just recently had it supported JDK 11. This is probably another reason as to why Kotlin is preferred by Google. It provides more powerful language features SOONER than Java even though later versions of Java now support similar things (lambdas for example).
By the time Java will get some features then Kotlin will get new features. It will always be ahead...
Could show examples on each topic.
Thanks for video. What language is better to start from, bearing in mind that I’m null in programming?
C because then you will understand pointers really well which can be something difficult to grasp if you start out with python
Definitely give Kotlin a try. I'm having fun learning Kotlin on JetBrains (the developer behind Kotlin) as my first programming language and about to complete my third project in less than a month in. I tried to learn C++ and Java in the past and struggled.
@@nilebrixton8436 java vs kotlin vs dart which is best for starting app development ?
Kotlin is the Future
What about flutter?
@@gboy6120 Nope
@@gboy6120 I think dart sucks
@@gboy6120 Flutter is for baby programmer but it could be better in the future, and now it's not a native language lol
@@TriNguyen-ym3hf + poor performance over native (java or kotlin) on android.
have you heard about Lombok? With this plugin dependency, you dont need getter setter or Constructors in Java classes, it's quite handy !
but wait a minute, these are just syntactic changes, i dont understand, you are still dealing with the jvm and related classes, right?
As a beginner I wanna know which language to pursue
this is like bot-made video
for those complaining, java is really easy to learn, you learn about OOP and advanced concepts in a really easy and high level way. if you start with somethig like python it'll be harder to learn other languages and you'll lack many things
background music too loud. But thanks anyway.
Kotilin is just child of legal issues between Oracle and Google and Java source code. I don't see any benefits using Kotlin over Java. Maybe some things u can write in less code. Compose is disaster for complex ui. (My personal experience)
What? Kotlin is developed by Jetbrains. It's basically java with more modern Syntax.
E.G. Null-Safety is no benefit? Java-Stockholm ...
Java is far more better then kotlin. Google just made kotlin as official language because of the partnership with jetbrain (Inventor of kotlin and Android studio)
Well to be honest i rly like Kotlin 😁Its very simple but powerful 👍
@@baphomet8958 I agree that it is simpler then java, but still it lacks in many areas. Specially in frameworks and community
@@androdeveloper7261 weird statement considering you can literally run any java library/framework in kotlin
@@kanmeo Yes it can. I meant that programmer still choose java for writing frameworks because of the compatibility that you started above
Java is dead mate
At 2:23, that's XML not Java. :)
We’re so happy to hear from you! Thank you for your valuable feedback. 💗
Java? Easy to learn? Dude wtf mostl people hate (or are scared of) Java due his sintax
We love hearing from you! Thank you for leaving feedback for us. 🤓
Yes, pretty easy. Compare to C/C++ where Java was inspired from!
C/C++ has pointers (Java doesnt), multiple inheritance (Java doesnt), lack of dynamic memory allocation (Java doesnt), lack of automatic garbage collector (Java doesnt)... And you say that Java isnt easy?! C'mon!
Yes and C/C++ it's easier than assembly... of course. And python it's easier than java@@lucaspiano
One of the biggest eCommerce in Europe is written mostly in Kotlin nad Java. ( about 1000 microservices in Kotlin )
JIT can optimize Java code much better than static compilers
Java is very good to build up OOP knowledge (don't blame NPE, that means your design has flaws), Kotlin has some handy features (like coroutines and data class as mentioned in the video), that is fun to write but confusing to read sometimes.
Lol we all know that NPE is a developers mistake but it is called a million dollar mistake for a reason if Kotlin can solve this thing to an extent by giving compile time errors then it's a win situation for the developers .
Plus your comment sounds idiotic when you are saying Kotlin is confusing in terms of readability. Kotlin is not confusing it's you who are struck with java long syntax that you can't understand the readability and conciseness of Kotlin Syntax.
The Kotlin code is clean and readable at the same time...
Kotlin is just marketing of JAVA forever
We can see you prefer Java 😅
Those drawbacks aren’t even drawbacks! So you actually didn’t even find any drawbacks of Kotlin. Pure facts!
This and the Advantage/Disadvantage-BS makes this video pure nonsense.
I was honestly appreciate UA-cam algorithm, that I find this video!
Another well explained video. Currently I use Java since I have not learned Kotlin
Hi man, I just started learning, do u recommend me Java or Kotlin ? Thanks
@davidthewise6617hi sir. In my country VietNam, i consider that the job for Kotlin is quite little. So which one is better to start? Java or Kotlin?
Great video!
Would help to explain the usual pronunciation of words in the context of code (e.g. "record", which was pronounced like in "I'll _record_ something" instead of like in "a music _record_").
I think saying it in the correct way makes developers feel more at home.
Edit: Just by looking at your content both here and your page anyone can see the attention to every detail, great job!
Slava Ukraini
I'd be surprised if the speaker isn't just reading from a script and has any idea of what he's talking about. They'll often say a simple word when it would have been an easy place to elaborate on what it means, e.g. "in Kotlin, it's a lot easier" 🔚, "that is coroutines" 🔚. Or they emphasize the wrong word: "it *is* considered an object". Or pronounce the word wrong like how they said "inference" like "interference" just without the "ter"
it's text to speech...
//code conciseness
public class Person { //"plain old data" version of Person
public String name; //make everything public because OOP introduces tradeoffs for zero gain
public int age; //original uses string type for age for who knows what reason, maybe only kotlin has an int type?
}
Very interesting idea, thank you
Swiggy Deiliverh App made by Konltin
Null Safety can be dealt with by using Optionals and with the var keyword you can infer variable types
Nicely explained how reading the code is important
java
not over the kotlin . JAVA is the untold king over all the programming language.
2:25 XML verbosity attributed to the Java language makes this video immediately irrelevant
In Android app development, JAVA is dead and replaced by Kotlin.
That is Fact !
If Java goes away, so goeth I: Back to Visual Studio with MFC and my Android devices get acid bathed.
Why does he say that Java is easy to learn but Kotlin "has a steep learning curve"
Kotlin is significantly easier
Thank you for sharing your experience!
"Yes, I like to type more lines to get the same results"... Said no one ever.
😳😳😳
Simple and to the point! Thanks
Biggest downside of Kotlin is if you speak German, it sounds like the name means "puke language".
😉
Mmm I really like verbosity lenguages :D
Me too... I can read and understand the damn thing months later.
... Kotlin can also use Java libraries
i m not a fan of java but i cant say it is slow bro
Thank you for sharing your view 🙃
you say that java is easy to learn? I`m crying with JS xD
I learned about Kotlin through minecraft mods
Best way to learn, to be honest! Why still don't we have programming schools in minecraft?🤔
Java is my second programming language, I learned it in school, but never really liked it
Kotlin compiled into Java, and just can’t kill himself.
Koltin is too slow to compile. It feels like a 80's compiler.
Thank you for sharing your experience!
high quality content 🔥🔥🔥
Kotlin won't replace Java because it has to be compiled into java
Its not, its compiled to bytecode for JVM. Giving this a heart reflects the video quality.
Hmm might be biased
Java supports RECORDS. Just because Android doesn't support java RECORD and Kotlin automatically generates the boilerplate code, is it a problem of Java or Android? And since Android ecosystem is a Google's child, same as the choice of Kotlin being default language in AndoridStudio, then doesn't it look like there is artificial fight with java by not implementing the higher versions and features of java properly? Someone wants to have monopol over the whole Android, and that's where kotlin kicks in. Java is also very concise, especially newer versions. You say java java don't have automatic type inference, well maybe on Android it is another feature that is fighted with, but java has "var" since long time now, funny that in 2022 you still enumerate it as a Kotlin advantage over java. And you said that java is not secure, and that Kotlin can laverage the libraries of java becuases uses JVM - this implies that Kotlin can't be more secure than java. And the point about java allowing "null", well, to me it is very unwise to point this as any advantage or disadvantage of one language over another - this whole "null" thing is artficial problem of people not understanding the languge, the null thing can't really be reasonably opted out, every solution to this introduces additional level of complication, because in Object Oriented programming the concept that the referenced object is not existing which is the concept of "null" is like the concept of "zero" in math is part of the world, and so we should have Optional for zero, because dividing by 0 can cause RuntimeException? No, imagine the readablity of code checking before every divison - that would be a mess and a bugs cradle - the program needs to be designed that where there can't be zero, there is no zero, and where there can't be null, there is no null, the programmer is responsible (proper code, proper tests, documentation etc...). In java you have the Optional type where you can return some object instead of null, but I never saw a scientifically conducted examination stating that the lack of null in language is better than having it, especially to prove that it improves code readability, lowers the bugs rate etc, actually what I've found is the the more complex the code, the more fancy ideas there is more bugs, and that's it. KISS
Sound null safety is actually important in production. Don't kid yourself
The video implicitly compare java for android to kotlin and not newer version of java. So your comment is unnecessarily long.
You never wrote something in Kotlin. You didnt understood the null concept of kotlin. Why do write a wall of opponion to something you dont understand?
@@teenriot-deAt least I am able to have my own opinion and it seems it is too hard for you to argue in a meritorious way.
@@Krzys6301 Flatearthers also have their own opinion. I had an argument and its all needed. You didnt understand the null concept in Kotlin. You even dont know that there is also null in Kotlin. Therefore, all of your "opinion" is wrong, because its based on untruth.
Who taught this narrator how to speak English?
Something was unclear in video? Please, specify what exactly, so we can upgrade our vocabulary or accent in further videos!
@@Jelvix Many words were pronounced incorrectly.
There’s nothing wrong with your English, this is just a hater
Man's just a Java fan.
Perfectly explained and exactly what I needed.
Java is easy to what???
Java easy to learn lol 😆 , it's sometimes Chinese food hhh
wait a minute did u just say -"java easy to learn" !!!!!!!!!!!!!!!!!!!!!!!! dude are u alright??
Is this some sort of AI narrating? Core-atines? infur-ance?
Thank's
I hate Jave... More than sand.
Kotlin is fun
We appreciate you sending us your feedback. 😉
@@Jelvix Ye I learned Kotlin cause I felt like making minecraft mods in another language to be honest. Thanks to ShadowFacts, that's possible using their API.
Is this AI voice? I don't like it 👎👎