Rules to create Immutable class? | Core Java Interview Questions | Naresh IT

preview_player
Показать описание
Rules to create immutable class in Java | Naresh IT

Welcome to the Core Java Tutorial Series! In this video, we introduce the essential concepts of Core Java and guide you through building a strong foundation in Java programming. Perfect for beginners and those refreshing their Java skills!

🔹 Course Details :
• Topic: Core Java Course Overview | NareshIT

🔹 Join Our Community For Latest Updates:

• 📚 Learn Core Java with NareshIT and take your Java development expertise to the next level. Don’t forget to like, comment, and subscribe for more tutorials and updates!

#corejava #javatutorial #javaprogramming #learnjava #nareshit #javaforbeginners #javacourse #programmingbasics #javadevelopment #javaskills #javalearning #enterprisejava #javatraining #javaseries #javacode #javaframeworks #javatips #springframework #javaconcepts #codingwithjava

*💡 About NareshIT:

"Naresh IT is having 14+ years of experience in software training industry and the best Software Training Institute for online training, classroom training, weekend training, corporate training of Hadoop, Salesforce, AWS, DevOps, Spark, Data Science, Python, Tableau, RPA , Java, C#.NET, ASP.NET, Oracle, Testing Tools, Silver light, Linq, SQL Server, Selenium, Android, iPhone, C Language, C++, PHP and Digital Marketing in USA, Hyderabad, Chennai and Vijayawada, Bangalore India which provides online training across all the locations
________________________________________________________________________________________________________________

💡 Our Online Training Features:
• 🎈 Training with Real-Time Experts
• 🎈 Industry-Specific Scenarios
• 🎈 Flexible Timings
• 🎈 Soft Copy of Material
• 🎈 Recorded Videos of Each Session
________________________________________________________________________________________________________________

Please write back to us at
Рекомендации по теме
Комментарии
Автор

Best lecturer for programming. I started to learn programming correct way from you sir. You tougth C language in another level. I was searching Sri nivas sir's java videos. And I found it. Thank you from Sri Lanka.

sandaliyasara
Автор

Its a good explanation.
Missing the scenario, if an immutable class contains a mutable object. In that case we need to return a deep-copy of mutable object.

suyashjaiswal
Автор

This is good. Only one thing you could add is why Strings are immutable. usually that's a follw-up question after this question

saby
Автор

Please explain the concept about mutable variables as well

harshable
Автор

If u are in rush 😊
1.define class as final(can't be extended or methods over ridden)
2.make instance variable as final
3.assign instance variable via constructor
4.remove setters

sanathrayala
Автор

even if we provide setter method, I think it won't make a difference as we have already defined variable as final

pranavkedia
Автор

Good explanation.But how can i use date function and still makes it mutable

UserShivaNice
Автор

What if our class is having instance of any mutable class? Do we need to return new instance on the call of getter?

jyotiprakashrai
visit shbcf.ru