#34 What is String in Java

  Рет қаралды 152,685

Telusko

Telusko

Күн бұрын

Пікірлер: 31
@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 11 ай бұрын
What is output
@smith-ch8wy
@smith-ch8wy 9 ай бұрын
@@V_mikey Murdoc u 6 ur true true murdoc MURDOC Murdoc programs
@RobbyBalboa-cj4ig
@RobbyBalboa-cj4ig 15 күн бұрын
@@V_mikey Try it..
@vishnuprasad4381
@vishnuprasad4381 Күн бұрын
U are differently special as channel name in telugu But teaching in English 😂❤🎉
@darklord9500
@darklord9500 Жыл бұрын
@Telusko Thanks for remaking videos...
@hardwaregeek995
@hardwaregeek995 3 ай бұрын
String s = new String ("abc"); String S2 = "abc"; How many objects will be created in the heap memory?
@tommyhsiao2663
@tommyhsiao2663 Ай бұрын
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.
@vishwa5384
@vishwa5384 7 ай бұрын
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
@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?
@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.
@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 2 ай бұрын
@@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 2 ай бұрын
@@abbaszandi7481 If we trigger the 2nd line first and then the 1st one. It should be 3 objects - Chatgpt do you agree?
@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
Рет қаралды 148 М.
#40 Encapsulation in Java
11:42
Telusko
Рет қаралды 203 М.
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 32 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33
#36 StringBuffer and StringBuilder in Java
5:41
Telusko
Рет қаралды 218 М.
Why is Python 150X slower than C?
10:45
Mehul - Codedamn
Рет қаралды 22 М.
Java String methods 💬
6:18
Bro Code
Рет қаралды 130 М.
Generics In Java - Full Simple Tutorial
17:34
Coding with John
Рет қаралды 1,1 МЛН
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,2 МЛН
#58 Object Class equals toString hashcode in Java
12:00
Telusko
Рет қаралды 127 М.
#51 This and Super Method in Java
12:11
Telusko
Рет қаралды 127 М.
#61 Abstract Keyword in Java
12:09
Telusko
Рет қаралды 175 М.
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН