ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

Essa Essa
من قبل Essa Essa , Associate Professor , Kirkuk University

Making the class final prevents subclasses that could break

Veenalakshmi PV Plamkudy
من قبل Veenalakshmi PV Plamkudy , Android Developer , Iroid Technologies,Kaloor

final is used by the class loading  mechanism....It profound fundamental security aspects

feroz shaik
من قبل feroz shaik

string is immutable.once we instalizeed we can not change its value.

Mahmoud Rashad
من قبل Mahmoud Rashad , Oracle Apps Techno Functional Consultant , NTG, Saudi Ports Authority Project

It is immutable objects, Ther are many advantages of immutable objects as you can share duplicates by pointing them to a single instance.

Nadeem Qasmi
من قبل Nadeem Qasmi , backend,DevOps Engineer , Youcan

java string is the core class anad String class is immutable in Java, The string pool was possible only if the string is made final. As if some variable is referring to String pool's object and somehow it gets modified, then it will lead to a failure.

PREM KUMAR  R
من قبل PREM KUMAR R , Front End Developer

The one reason is all the inputs are get in only the Strings. The String is immutable.

The another reason is security and performance. Once we initialize the string is we cannot change the value.

it is used by the class loading mechanism, and thus have profound and fundamental security aspects.string is a very core class in java

Abdelrahman AlMhisen
من قبل Abdelrahman AlMhisen , Research & Development Manager , Menacast

Requirement of String Pool,  Caching Hashcode, Facilitating the Use of Other Objects, Security, Immutable objects are naturally thread-safe

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟