#34 What is String in Java

  Рет қаралды 157,728

Telusko

Telusko

Күн бұрын

Пікірлер: 31
@mrmansir3734
@mrmansir3734 Жыл бұрын
so on 7:00, is String name = "navin"; just a simplified way of typing String name = new String("navin"); ? Do they both work the exact way and mean the same thing?
@SaiErukulla
@SaiErukulla 10 ай бұрын
Yes
@taraprasadsarangi8124
@taraprasadsarangi8124 7 ай бұрын
they are different String name = "navin"; is a string literal String name = new String("navin"); is an object even though they have the same value
@hardwaregeek995
@hardwaregeek995 3 ай бұрын
​@@taraprasadsarangi8124so how many objects will be created if we execute both the lines?
@abbaszandi7481
@abbaszandi7481 3 ай бұрын
@@hardwaregeek995 two objects. first one creates an object in an area in heap memory called string pool but when you use new keyword to create a string, you are telling the jvm to create string object in another area of heap maybe general part of heap but not in string pool.
@hardwaregeek995
@hardwaregeek995 3 ай бұрын
@@abbaszandi7481 If we trigger the 2nd line first and then the 1st one. It should be 3 objects - Chatgpt do you agree?
@kvelez
@kvelez Жыл бұрын
public class Main{ public static void main(String[] args) { String name = "Murdoc"; System.out.println(name); System.out.println(name.charAt(1)); System.out.println(name.length()); System.out.println(name.substring(1,3)); System.out.println(name.endsWith("c")); System.out.println(name.startsWith("M")); System.out.println(name.toLowerCase()); System.out.println(name.toUpperCase()); System.out.println(name.concat(" programs")); } }
@V_mikey
@V_mikey Жыл бұрын
What is output
@smith-ch8wy
@smith-ch8wy 9 ай бұрын
@@V_mikey Murdoc u 6 ur true true murdoc MURDOC Murdoc programs
@RobbyBalboa-cj4ig
@RobbyBalboa-cj4ig Ай бұрын
@@V_mikey Try it..
@darklord9500
@darklord9500 Жыл бұрын
@Telusko Thanks for remaking videos...
@vishwa5384
@vishwa5384 8 ай бұрын
can anyone tell me, when he clicks on the String keyword he is getting the String.class file how do i get it in my VS code also
@AnandKumar-mt9gv
@AnandKumar-mt9gv 7 ай бұрын
ctl + click on string word
@akshay7820
@akshay7820 Жыл бұрын
its showing when i click on definition // Failed to get sources. Instead, stub sources have been generated by the disassembler. // Implementation of methods is unavailable.
@hardwaregeek995
@hardwaregeek995 3 ай бұрын
String s = new String ("abc"); String S2 = "abc"; How many objects will be created in the heap memory?
@tommyhsiao2663
@tommyhsiao2663 2 ай бұрын
first line will check if "abc" in the string pool (special space in the heap memory), if it is not there create it. And new String ("abc") will create an object in the heap. Second line will check if "abc" literal is in the string pool, we have created it in the first line, so S2 will just point (reference) to that "abc". Total two objects are created, one is in the string pool, one is in the general heap memory.
@vishnuprasad4381
@vishnuprasad4381 17 күн бұрын
U are differently special as channel name in telugu But teaching in English 😂❤🎉
@monirkhan4583
@monirkhan4583 Жыл бұрын
hi sir i am your great friend 🙂🙂 But I have been suffering from a problem for some time.I have been learning java programming from watching your videos for almost four years.Should I learn or should I shift to another language? Because i want to be a freelancer🙂
@rajeshagarwal4137
@rajeshagarwal4137 Жыл бұрын
stop coding immediately
@logicshrey
@logicshrey Жыл бұрын
Bro you should consult a doctor!
@manojpatil2457
@manojpatil2457 Жыл бұрын
What have you been doing for 4 years?
@puruagni1927
@puruagni1927 7 ай бұрын
Why are you not updating VS Code? Please update VS Code.
@ArcturusWasTaken
@ArcturusWasTaken 7 ай бұрын
1. His VSCode is not old , he just customized the layout. 2. The tutorials are 1 year old tutorials, he cant really do anything about it. 3. Why do you want him to update it? Are u missing something he has?
@puruagni1927
@puruagni1927 7 ай бұрын
@@ArcturusWasTaken I'm just crazy like that, please ignore me
@monirkhan4583
@monirkhan4583 Жыл бұрын
hi sir i am your great friend 🙂🙂 But I have been suffering from a problem for some time.I have been learning java programming from watching your videos for almost four years.Should I learn or should I shift to another language? Because i want to be a freelancer🙂
@monirkhan4583
@monirkhan4583 Жыл бұрын
hi sir i am your great friend 🙂🙂 But I have been suffering from a problem for some time.I have been learning java programming from watching your videos for almost four years.Should I learn or should I shift to another language? Because i want to be a freelancer🙂
@monirkhan4583
@monirkhan4583 Жыл бұрын
hi sir i am your great friend 🙂🙂 But I have been suffering from a problem for some time.I have been learning java programming from watching your videos for almost four years.Should I learn or should I shift to another language? Because i want to be a freelancer🙂
@monirkhan4583
@monirkhan4583 Жыл бұрын
hi sir i am your great friend 🙂🙂 But I have been suffering from a problem for some time.I have been learning java programming from watching your videos for almost four years.Should I learn or should I shift to another language? Because i want to be a freelancer🙂
#35 Mutable vs Immutable String in Java
6:23
Telusko
Рет қаралды 152 М.
#40 Encapsulation in Java
11:42
Telusko
Рет қаралды 209 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 9 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
37:51
bayGUYS
Рет қаралды 1000 М.
Holy M0lly Guacamole: TKC's Last Hurrah
5:45
JYMV
Рет қаралды 1,7 М.
#32 Array of Objects in Java
8:52
Telusko
Рет қаралды 164 М.
#52 Method Overriding in Java
7:57
Telusko
Рет қаралды 167 М.
What is OpenTelemetry?
12:55
Highlight
Рет қаралды 15 М.
Java Strings are Immutable - Here's What That Actually Means
7:06
Coding with John
Рет қаралды 624 М.
#85 Threads in Java
5:13
Telusko
Рет қаралды 184 М.
#61 Abstract Keyword in Java
12:09
Telusko
Рет қаралды 181 М.
#51 This and Super Method in Java
12:11
Telusko
Рет қаралды 132 М.
#86 Multiple Threads in Java
11:30
Telusko
Рет қаралды 150 М.