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?
@SaiErukulla10 ай бұрын
Yes
@taraprasadsarangi81247 ай бұрын
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
@hardwaregeek9953 ай бұрын
@@taraprasadsarangi8124so how many objects will be created if we execute both the lines?
@abbaszandi74813 ай бұрын
@@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.
@hardwaregeek9953 ай бұрын
@@abbaszandi7481 If we trigger the 2nd line first and then the 1st one. It should be 3 objects - Chatgpt do you agree?
@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 Жыл бұрын
What is output
@smith-ch8wy9 ай бұрын
@@V_mikey Murdoc u 6 ur true true murdoc MURDOC Murdoc programs
@RobbyBalboa-cj4igАй бұрын
@@V_mikey Try it..
@darklord9500 Жыл бұрын
@Telusko Thanks for remaking videos...
@vishwa53848 ай бұрын
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-mt9gv7 ай бұрын
ctl + click on string word
@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.
@hardwaregeek9953 ай бұрын
String s = new String ("abc"); String S2 = "abc"; How many objects will be created in the heap memory?
@tommyhsiao26632 ай бұрын
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.
@vishnuprasad438117 күн бұрын
U are differently special as channel name in telugu But teaching in English 😂❤🎉
@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 Жыл бұрын
stop coding immediately
@logicshrey Жыл бұрын
Bro you should consult a doctor!
@manojpatil2457 Жыл бұрын
What have you been doing for 4 years?
@puruagni19277 ай бұрын
Why are you not updating VS Code? Please update VS Code.
@ArcturusWasTaken7 ай бұрын
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?
@puruagni19277 ай бұрын
@@ArcturusWasTaken I'm just crazy like that, please ignore me
@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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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🙂