Java is mounting a huge comeback
Key Takeaways
Discusses new features in Java 21, including unnamed classes and string templates
Full Transcript
it is June 5th 2023 and you're watching the code report Java is hands down my all-time favorite programming language to make fun of python developers roast it for having so much boilerplate see developers laugh at absurd class names like abstract Factory manager Singleton service manager Factory C plus plus developers hate that you can't blow your legs off with memory management as easily and JavaScript developers are still trying to fix things like dates they copied from java over 20 years ago unfortunately I have some bad news public static void main string arcs will no longer be a requirement to write hello world in Java 21 rendering an entire industry of java boilerplate memes static null and void and that's not good for people like me who make a living making fun of java because I need that boilerplate to put food on my family it's great news however for anyone who wants to learn Java or more accurately anyone who's forced to learn Java this new feature is called unnamed classes and instant main methods and allows you to create a main method without a class and public static void mainstream arcs this is a great change but I think we could actually make things a little bit better by also removing void and actually why do we even need a main function in the first place we could get rid of that altogether system out seems a little unnecessary there should just be a global print line function and if we rename it to print we then get a perfect language c-sharp introduced top level statements in 2020 and maybe in another 10 years Java will get there too before you get too excited though this feature is primarily designed to make learning Java more accessible to beginners the real boilerplate is not going anywhere in addition Java is primarily used in Enterprise which is very slow to adopt new features there are tons of mission critical applications out there still running Java 8 and it could be years or even decades before these new features get adopted but Java 21 also has some other cool updates like structured concurrency that allows you to run multiple concurrent jobs on multiple threads while treating them as a single unit of work but another thing you might find kind of crazy about Java is that it doesn't natively support string interpolation which means you need to concatenate a bunch of strings together like you're in kindergarten or use string.format which is also kind of annoying but in Java 21 we have a new string templates feature which is a new kind of expression that allows you to insert values directly into Strings we've come full circle to where Java is now looking more like JavaScript and JavaScript is looking more like Java and I even noticed that Java recently updated their website so now it only looks 10 years out of date instead of 20. this is a big strategic move that has caused Oracle stock to almost double over the last year the big question though is with all these awesome new features should you learn Java in 2023 when it comes to working as a programmer you should choose a field that's well paid interesting and legal but the reality is that you can only choose two of these Java is well paid and legal but not very interesting when looking at the syntax alone Java is pretty ugly if I want to write code for the jvm for fun I'd much rather use a language like kotlin or Scala that being said Java is still a Powerhouse language when it comes to Enterprise software it's used extensively at companies like Twitter and Google because it's a very well balanced language it's performant enough for most things it's relatively easy to use and most importantly has a huge ecosystem of stable libraries and Frameworks a few days ago I ran a poll for the best programming language of all time and Java came in dead last but now that we no longer need public static void main string args I think it'll reclaim the top spot and when with that being said I'd like to officially announce my retirement from making fun of java but let's enjoy these Java memes together one last time like this one that explains how object-oriented design patterns are often unnecessary and counterproductive when you could just be using simple variables and functions this next meme is a good one but you wouldn't get it so I'm not even going to try to explain it if you like Windows you might like Java because it loves to force you into annoying updates all the time and as you gain more experience as a programmer you'll eventually find out that everything doesn't need to be an object because these objects will pile up and devour your RAM and finally it's important to realize that not every meme is a joke many of them are a legitimate cry for help this has been the code report thanks for watching and I will see you in the next one
Original Description
Java 21 will bring major improvements to the world's most popular enterprise programming language. Learn about unnamed classes, string templates, and other new features expected in the future.
#programming #tech #thecodereport
💬 Chat with Me on Discord
https://discord.gg/fireship
🔗 Resources
Java 21 Unnamed Classes https://openjdk.org/jeps/445
Java in 100 Seconds https://youtu.be/l9AzO1FMgM8
Java for the Haters https://youtu.be/m4-HM_sCvtQ
🔥 Get More Content - Upgrade to PRO
Upgrade at https://fireship.io/pro
Use code YT25 for 25% off PRO access
🎨 My Editor Settings
- Atom One Dark
- vscode-icons
- Fira Code Font
🔖 Topics Covered
- New Java features in version 21
- Java Programming basics
- Unnamed classes and Instance Main Methods
- Java Memes
- Should I learn Java?
- Why do people hate Java?
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Fireship · Fireship · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Angular 4 Development and Production Environments with Firebase
Fireship
OAuth with Angular and Firebase Tutorial
Fireship
Anonymous Authentication with Angular and Firebase - Lazy Registration
Fireship
Angular Router Guards for Firebase Users
Fireship
Angular Firebase CRUD App with NoSQL Database Tutorial
Fireship
Upload Files from Angular to Firebase Storage
Fireship
How to Deploy an Angular App to Firebase Hosting
Fireship
Sharing Data between Components in Angular
Fireship
Loading Spinners for Asynchronous Firebase Data
Fireship
Angular 4 Transactional Email with Google Firebase Cloud Functions
Fireship
Firebase Database Rules Tutorial
Fireship
Autocomplete Search with Angular4 and Firebase
Fireship
Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Fireship
Angular Drag-and-Drop File Uploads to Firebase Storage
Fireship
Text Translation with Firebase Cloud Functions onWrite and Angular 4
Fireship
Custom Usernames with Firebase Authentication
Fireship
Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Fireship
Simple Pagination with Firebase and Angular 4
Fireship
How to Connect Firebase Users to their Data - 3 Methods
Fireship
Add Toast Message Notifications to your Angular App
Fireship
Facebook-Inspired Reactions System with Angular and Firebase
Fireship
Learn NgModule in Angular with Examples
Fireship
Lazy Loading Components in Angular 4
Fireship
Stripe Checkout Payments with Angular and Firebase - Part 1
Fireship
Process Stripe Payments with Firebase Cloud Functions - Part 2
Fireship
Selling Digital Content in Angular with Stripe Payments - Part 3
Fireship
Angular 4 Full Text Search with Algolia - Part 1
Fireship
Algolia with Firebase Cloud Functions - Part 2
Fireship
Firebase Phone Authentication in Angular 4
Fireship
Top 7 RxJS Concepts for Angular Developers
Fireship
Learn Angular Animations with 5 Examples
Fireship
Advanced Firebase Data Filtering (Multi-Property)
Fireship
Realtime Maps with Mapbox + Firebase + Angular
Fireship
Angular Reactive Forms with Firebase Database Backend
Fireship
Send Push Notifications in Angular with Firebase Cloud Messaging
Fireship
Top 7 Ways to Debug Angular 4 Apps
Fireship
Infinite Scroll with Angular and Firebase
Fireship
Use TypeScript with Firebase Cloud Functions
Fireship
Realtime Graphs and Charts with Plotly and Firebase
Fireship
Role-Based User Permissions in Firebase
Fireship
User Presence System in Realtime - Online, Offline, Away
Fireship
Location-based Queries with GeoFire and Angular Google Maps
Fireship
Angular ngrx Redux Quick Start Tutorial
Fireship
Angular Ngrx Effects with Firebase Database
Fireship
Progressive Web Apps with Angular
Fireship
Angular Ngrx with Firebase Google OAuth User Authentication
Fireship
RxJS Quick Start with Practical Examples
Fireship
Send SMS Text Messages with Twilio and Firebase
Fireship
Firebase Database Performance Profiling
Fireship
Native Desktop Apps with Angular and Electron
Fireship
Subscription Payments with Stripe, Angular, and Firebase
Fireship
Firestore with AngularFire5 Quick Start Tutorial
Fireship
Angular HTTP Client Quick Start Tutorial
Fireship
Google Sign-In with Firestore Custom User Data
Fireship
Star Review System from Scratch with Firestore + Angular
Fireship
Angular Chatbot with Dialogflow (API.ai)
Fireship
Learn @ngrx/entity and Feature Modules
Fireship
Infinite Scroll Pagination with Firestore
Fireship
Faster Firestore via Data Aggregation
Fireship
Contentful - CMS for Angular Progressive Web Apps
Fireship
Related Reads
🎓
Tutor Explanation
DeepCamp AI