String Immutable In Java Interview Question

  Рет қаралды 19,741

Naveen AutomationLabs

Naveen AutomationLabs

Күн бұрын

String Immutable In Java Interview Question
Schedule a meeting in case of any queries/guidance/counselling:
calendly.com/naveenautomation...
~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
kzbin.info%20Au...
Follow me on my Facebook Page:
/ naveenqtpexpert
Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
t.me/joinchat/9FrG-KzGlvxjNmQ1
Naveen AutomationLabs Paid Courses:
GIT Hub Course:
naveenautomationlabs.com/gitc...
Java & Selenium:
naveenautomationlabs.com/sele...
Java & API +POSTMAN + RestAssured + HttpClient:
naveenautomationlabs.com/manu...

Пікірлер: 22
@naveenautomationlabs
@naveenautomationlabs Жыл бұрын
One small correction in the video, when we concatenate x and y it will generate a new String in heap memory not in SCP. So in this example, "abcabc" will be stored inside the heap memory. this is the internal implementation of concat() method in java: Concat method: public String concat(String str) { int otherLen = str.length(); if (otherLen == 0) { return this; } int len = value.length; char buf[] = Arrays.copyOf(value, len + otherLen); str.getChars(buf, len); return new String(buf, true); }
@varshashinde6641
@varshashinde6641 Жыл бұрын
Great... Create series like this which covers small nd important topic... Waiting for next one...👍
@artimandale8286
@artimandale8286 Ай бұрын
Simply amazing
@srinathsrinath24
@srinathsrinath24 Жыл бұрын
Amazing explanation......
@shilpashravge5393
@shilpashravge5393 Жыл бұрын
thank you Naveen :)
@jayanthipyarasani979
@jayanthipyarasani979 Жыл бұрын
Hi Naveen, could you please tell some tips to clear client round. It would be helpful
@Ram_5
@Ram_5 Жыл бұрын
Hi Naveen, Can you please tell me solutions for the question in the below. Split a String but don't split when character repeats.. input s="aHHHbYY"; Out put would be like output:[a, HHH, b, YY] Thanks in advance. Ragards, Kanvitha
@Pruthvirajbyadgi
@Pruthvirajbyadgi Жыл бұрын
First comment sir...youre superb sir
@sandeeprapolusandeeprapolu
@sandeeprapolusandeeprapolu Жыл бұрын
Good video make a series'
@sanketkale8974
@sanketkale8974 Жыл бұрын
The value of x is abc Naveen in this question
@SakshamKulshresthasaksham
@SakshamKulshresthasaksham Жыл бұрын
Very helpful video but just one correction, at 7:51 you mentioned Strings are the most commonly used data type. But it is not data type, it is class. We can call it data storage but not data type.
@naveenautomationlabs
@naveenautomationlabs Жыл бұрын
String is a non primitive data type, all the classes in java comes under non primitive data types category. It is also called derived data type or reference type which refers to an object. So yes String is a data type.
@niteshagrawal9728
@niteshagrawal9728 Жыл бұрын
Since abcabc is not refered by anyone , will it be removed by GC ?
@Iam_namangupta
@Iam_namangupta Жыл бұрын
No, GC can not access the SCP area. It is wiped off when JVM is shutdown. Because of SCP, it is faster to use String.
@niteshagrawal9728
@niteshagrawal9728 Жыл бұрын
@@Iam_namangupta But from Java 7 SCP is the part of heap memory only
@Iam_namangupta
@Iam_namangupta Жыл бұрын
Yup, SCP area is part of Heap, but is special area and JVM knows that it is not suppose to remove the constants inside it even if there is no reference to them.
@niteshagrawal9728
@niteshagrawal9728 Жыл бұрын
​ @CricJammer If the SCP is not garbage collected until the JVM is shut down, is there a possibility that SCP can go out of memory? or it will start to use the native OS memory?
@naveenautomationlabs
@naveenautomationlabs Жыл бұрын
SCP takes advantage of special treatment from the garbage collector. The garbage collector does not visit SCP with the same frequency (cycles) as other memory zones but it does.
@jyotsnaswarnakar8345
@jyotsnaswarnakar8345 Жыл бұрын
abc
@Yuva_Kiran
@Yuva_Kiran 11 ай бұрын
x
Convert String to Capitalize String in java
15:29
Naveen AutomationLabs
Рет қаралды 11 М.
Why String is Immutable and Final in Java?
19:59
Naveen AutomationLabs
Рет қаралды 86 М.
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 9 МЛН
1 or 2?🐄
00:12
Kan Andrey
Рет қаралды 27 МЛН
What is String Immutable || Why String Object Is Immutable In Java (Hindi)
17:36
Difference between Interface and Absract Class
30:52
Naveen AutomationLabs
Рет қаралды 178 М.
#20 - Difference between Synchronization and ASynchronization Calls With Examples
18:28
Java Strings are Immutable - Here's What That Actually Means
7:06
Coding with John
Рет қаралды 605 М.
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 294 М.
How To Unlock Your iphone With Your Voice
0:34
요루퐁 yorupong
Рет қаралды 28 МЛН
#miniphone
0:16
Miniphone
Рет қаралды 3,7 МЛН