9.2 What is toString method in Java Example

  Рет қаралды 244,442

Telusko

Telusko

9 жыл бұрын

toString is defined inside Object class.
toString() method is used java when we want a object to represent string.
overriding toString() method will return the specified values.
This method can be overridden to customize the String representation of the Object.
Check out our website: www.telusko.com
Follow Telusko on Twitter: / navinreddy20
Follow on Facebook:
Telusko : / teluskolearnings
Navin Reddy : / navintelusko
Follow Navin Reddy on Instagram: / navinreddy20
Subscribe to our other channel:
Navin Reddy : / @navinreddy
Telusko Hindi :
/ @teluskohindi
Subscribe to the channel and learn Programming in easy way.
Java Tutorial for Beginners: goo.gl/p10QfB
C Tutorial Playlist : goo.gl/8v92pu
Android Tutorial for Beginners Playlist : goo.gl/MzlIUJ
XML Tutorial : goo.gl/Eo79do
Design Patterns in Java : goo.gl/Kd2MWE
Socket Programming in Java : goo.gl/jlMEbg
Spring MVC Tutorial : goo.gl/9ubbG2
OpenShift Tutorial for Beginners : goo.gl/s58BQH
Spring Framework with Maven : goo.gl/MaEluO
Sql Tutorial for Beginners : goo.gl/x3PrTg
String Handling in Java : goo.gl/zUdPwa
Array in Java : goo.gl/uXTaUy
Java Servlet : goo.gl/R5nHp8
Exception Handling in Java : goo.gl/N4NbAW

Пікірлер: 108
@allenllewellynkra
@allenllewellynkra 6 жыл бұрын
I never understood this method until watching this video. Thanks man
@AadityaKavthekar
@AadityaKavthekar 4 жыл бұрын
Look! I thought of typing the same comment and then saw, this is already commented by someone! Thanks Navin Sir :)
@fernandomora1963
@fernandomora1963 4 жыл бұрын
I'm not even trying to learn Java and I'm having fun watching your videos! Definitely going to recommend your java tutorials to beginner friends I have. Of all the years I've been watching tutorials, you are the easiest to follow.
@anuthomas5184
@anuthomas5184 2 жыл бұрын
You are a great Teacher and.. a good mentor... Actually I feel very difficulty in learning java.... But your tutorials are really understandable and easy to learn. Now my hobby is watching your videos from the beginning... Now I feel interest in java. I am sure that if I follow all your videos. I can do it. Thanku so much sir. 👌👌👌👌
@soumyaranjanmohapatra7933
@soumyaranjanmohapatra7933 Жыл бұрын
I am a testing student and now learning core java for automation... your channel is really a god gifted thing to me....i have already watched your maximum videos..thank you sir 🙏
@Th3Proj3ct2501
@Th3Proj3ct2501 4 жыл бұрын
Amazing job describing the toString, was having issues but that put alot into perspective
@vladanulardzic5859
@vladanulardzic5859 3 жыл бұрын
Perfect practical explanation (never seen better explanation for toString()). Thank you. Keep on.
@muralikrishna6199
@muralikrishna6199 4 жыл бұрын
nobody could have explained it better,you are so great sir
@GhanshyamSingh-ix2wo
@GhanshyamSingh-ix2wo 7 жыл бұрын
I was confused about toString, you made my day.. thank you
@keymaster9306
@keymaster9306 6 жыл бұрын
Wonderful explanation. This is the best I've had. Thank you sir!! Please keep up this great work!
@mysticstardust1109
@mysticstardust1109 4 жыл бұрын
thank you sir, my one year of confusion is solved in afew mins.
@shyamkachhadiya4964
@shyamkachhadiya4964 5 жыл бұрын
sir really i wanna say that you are real java guru
@saggitariusA
@saggitariusA Жыл бұрын
Great explanation with explicit details.. Thanks Naveen
@salaheddinemakkaoui7970
@salaheddinemakkaoui7970 7 жыл бұрын
thank you very much actually you give us the basic things with the easy way
@hassanawodi5888
@hassanawodi5888 6 жыл бұрын
Excellent tut on toString methods.
@ammabalasimha
@ammabalasimha 6 жыл бұрын
Thanks alot Bro..explanation is very clear and crisp.
@saibagam5184
@saibagam5184 8 жыл бұрын
Thank u very much, your tutorials are very good sir.
@ashokbadade9894
@ashokbadade9894 Жыл бұрын
very good videos on java this shows your hard work in java thank you so much sir .
@manuchaudhary7902
@manuchaudhary7902 6 жыл бұрын
Sir, you are brilliant. Thank you very much.
@faheelansari7353
@faheelansari7353 4 жыл бұрын
you describe it deeply ........nice.......thnx
@Mariam_PinkLotus
@Mariam_PinkLotus 4 жыл бұрын
5:49 the code I need. Thank you!
@pbeeby
@pbeeby 4 жыл бұрын
thank you for taking the time to upload this video :-)
@PrashantSedhainOfficial
@PrashantSedhainOfficial 5 жыл бұрын
Thank you for the great brief.
@santoshchauhan2086
@santoshchauhan2086 4 жыл бұрын
thank you very much sir ,this metod was alien to me before this video
@andrzejkraszewski1606
@andrzejkraszewski1606 5 жыл бұрын
Great explanation, thanks!
@foton8998
@foton8998 4 жыл бұрын
You are explaining and the clouds are disappearing, thank you soo much!
@sarrae100
@sarrae100 4 жыл бұрын
Woww, that was smooth!!
@gilbertmacheke8664
@gilbertmacheke8664 7 жыл бұрын
Excellent explanation
@2010aishwary
@2010aishwary 4 жыл бұрын
very nice explanation, thanks.
@rajkumarwadeyar6409
@rajkumarwadeyar6409 6 жыл бұрын
Now I understand how toString() works. Amaznig man. Thank you.
@downloaderhdvideomohamed747
@downloaderhdvideomohamed747 4 жыл бұрын
Thanks sir I'm student so the knowledge I get from ur explanation is more huge than the one of my class teacher.
@MrContender07
@MrContender07 7 жыл бұрын
explaination is excellent.....sir sir you want to explain about the object class in java....please explain properly with example
@Himanshu-sd8te
@Himanshu-sd8te Жыл бұрын
The best explanation
@fazlhansaym4534
@fazlhansaym4534 4 жыл бұрын
thank tou very much sir, ı never understood toString method before watch this video
@vijaykumar-ut1ze
@vijaykumar-ut1ze 4 жыл бұрын
Tostring method will be called only when object present in sysout or anywhere it will call
@yash27619
@yash27619 4 жыл бұрын
@@vijaykumar-ut1ze only when object is present in sysout
@xiaoti8035
@xiaoti8035 2 жыл бұрын
This is an amazing explenation
@wilsonlaynez5313
@wilsonlaynez5313 6 жыл бұрын
I love you brother! Thanks!
@nikoufarsiu4833
@nikoufarsiu4833 4 жыл бұрын
now i understand toString ! tnx
@toufikurrahmantoufik5368
@toufikurrahmantoufik5368 5 жыл бұрын
thanks help to understand
@GauravSharma-bl7nu
@GauravSharma-bl7nu Жыл бұрын
excellent sir . iam a student of your ineuron batch
@OliverJoshuaJacob
@OliverJoshuaJacob 8 жыл бұрын
Thanks. It did Help.
@meditationrelaxationmusic6454
@meditationrelaxationmusic6454 6 жыл бұрын
very well explained
@akshaysilgari2097
@akshaysilgari2097 2 жыл бұрын
Great explain
@vignesh-jg1ym
@vignesh-jg1ym 5 жыл бұрын
Thanks ...& Keep it up.. : )
@dannyphantom0073
@dannyphantom0073 3 жыл бұрын
Do we get that hash code only when we have string and integer as parameters ?
@parijatbandyopadhyay8057
@parijatbandyopadhyay8057 5 жыл бұрын
Bro, u rock!
@akshaysilgari2097
@akshaysilgari2097 2 жыл бұрын
Great video
@nktt9351
@nktt9351 4 жыл бұрын
Sir if every class extends object. So extending any other class is not multiple inheritance??
@kabitabhandari2183
@kabitabhandari2183 6 жыл бұрын
Never knew this!! wow
@MrRossss1
@MrRossss1 7 жыл бұрын
awesome thanks :)
@amitgupta-tz9cc
@amitgupta-tz9cc 9 жыл бұрын
Sir, does public class extends object class???
@Rawrlawlsaws
@Rawrlawlsaws 8 жыл бұрын
Nice tut bro
@amitchaurasia592
@amitchaurasia592 3 жыл бұрын
Soo smooth👏👏👏👏👏
@OCEAN-fc9wl
@OCEAN-fc9wl 6 ай бұрын
Thank you sir
@rohankumbhojkar6803
@rohankumbhojkar6803 3 жыл бұрын
Thanks a tonne!!!!!
@user-xm9il3fn8m
@user-xm9il3fn8m Жыл бұрын
Can we overload toString method!?i tried it with different list arguements it giving me the output
@oshadhaedirisinghe1455
@oshadhaedirisinghe1455 2 ай бұрын
Thank you
@LukaszSkyWalker
@LukaszSkyWalker 6 жыл бұрын
Thx!!
@nareshnaresh7087
@nareshnaresh7087 4 жыл бұрын
Which platform are you using
@SinghRahul-
@SinghRahul- 4 жыл бұрын
Thanku..
@kholood7242
@kholood7242 8 жыл бұрын
thanks a lot ^^
@NinaHProductions1
@NinaHProductions1 7 жыл бұрын
Tank you!
@AryanKohli-hkscx
@AryanKohli-hkscx 3 жыл бұрын
i have seen at some places tostring is used with arrays ..i don't get it
@rinadem5219
@rinadem5219 Жыл бұрын
amazing
@esayasbekele1838
@esayasbekele1838 8 жыл бұрын
thank you broth good tut
@Israel9068
@Israel9068 7 жыл бұрын
Nice to see some Abesha here :)
@alexchabanenko6347
@alexchabanenko6347 4 жыл бұрын
Thanks
@prateekgupta1320
@prateekgupta1320 5 жыл бұрын
Nice teacher
@micah167
@micah167 5 жыл бұрын
Thanky ou!
@MrAbbasalrassam
@MrAbbasalrassam 5 жыл бұрын
You are Adorable ! thank you so much
@bajishaik4558
@bajishaik4558 4 жыл бұрын
Teluskunnanu Thank you sir
@ReyPeon
@ReyPeon 7 жыл бұрын
nice, ty!
@ishratity2537
@ishratity2537 6 жыл бұрын
very good
@kiranlalasangi6792
@kiranlalasangi6792 3 жыл бұрын
thnks bro
@Thegamer-yp7qq
@Thegamer-yp7qq 8 жыл бұрын
where do u learn java?
@j.t.9175
@j.t.9175 4 жыл бұрын
Right here bro
@praveenparashar5002
@praveenparashar5002 5 жыл бұрын
fantastic
@roycefernandes333
@roycefernandes333 7 жыл бұрын
Thanks!!!!!!
@Happy-kc2kw
@Happy-kc2kw 3 жыл бұрын
Great
@alexjohnlovesu
@alexjohnlovesu 6 жыл бұрын
Superb
@tshepojaphta8718
@tshepojaphta8718 6 жыл бұрын
thanks
@sharanusajjan8181
@sharanusajjan8181 4 жыл бұрын
thank you , sir...and ur face like Indian cricket player Shekhar Dhawan
@avinashsomwanshi4064
@avinashsomwanshi4064 7 жыл бұрын
Hello sir toString return type is String then how it is possible to return int value i. e roll no in toString method that I didn't got
@Keyakina
@Keyakina 7 жыл бұрын
prob bc it gets casted to a string
@prasanmishra4216
@prasanmishra4216 4 жыл бұрын
see when you add any string to any int it automatically converts to string so string + int = string , int+string = string and string + string = string , thats y return type string.
@irudhayaswamy
@irudhayaswamy 8 жыл бұрын
Thank You shikhar dhawan
@burhannaseer4348
@burhannaseer4348 4 жыл бұрын
good
@jneeraj2011
@jneeraj2011 5 жыл бұрын
I'm confused that y u are creating a class inside class
@banugaria967
@banugaria967 7 жыл бұрын
betterexplained thnakyou:)
@mohammedviso2269
@mohammedviso2269 7 жыл бұрын
Graet
@bryanlowks6117
@bryanlowks6117 3 жыл бұрын
cool
@niketangupta1286
@niketangupta1286 6 жыл бұрын
Can't see anything Please remove tha Voice typing lines...
@emanuelegurini
@emanuelegurini 5 жыл бұрын
i love you
@smokey750
@smokey750 6 жыл бұрын
You should be careful about saying hashCode() returns a unique code in general. There should be very rare occurrences of it ever getting a repeated code for different values, but there are collisions none-the-less in some objects of greater than an int's size that have to accounted for.
@Mia-io2su
@Mia-io2su 6 жыл бұрын
smokey750 can you plz. Explain in simple language b'cas I can't understand you explanation bro.
@marksummers463
@marksummers463 2 жыл бұрын
Decent video but you need to make the presentation as simple as possible. Get rid of the extraneous stuff like calling up special features of eclipse or whatever it is and just type the silly thing. But thanks. I think the simple way of explaining it is to say that if you dont invoke the override, the computer will print out some useless information using the useless default toString method. But if you override it, you get whatever you type after the word return.
@sargonmarqos5435
@sargonmarqos5435 8 жыл бұрын
you mix up things
@gokceozkul3522
@gokceozkul3522 4 жыл бұрын
I have turned off my adblocker for you... Did you fall from heaven, sir??
@pipicansikmetcan360
@pipicansikmetcan360 Жыл бұрын
😱
@SaintMando98
@SaintMando98 5 жыл бұрын
still super confused
@prasanmishra4216
@prasanmishra4216 4 жыл бұрын
why ?? in which line ??
@maazakmal6830
@maazakmal6830 11 ай бұрын
Sir muh pe paani maar k aao😅
@Thegamer-yp7qq
@Thegamer-yp7qq 8 жыл бұрын
fuck . first discuss ( this)
@AliVallil
@AliVallil 8 жыл бұрын
+The gamer hahaha....he used "this" there were two variables in the same name and he referred the first variable with "this" and assigned that variable to another temporary variable of the same name....if you use different names for your main variables and temp variables then no need of "this"......
@colesmith5916
@colesmith5916 6 жыл бұрын
i cant understand his accent
@koreancaptain2955
@koreancaptain2955 5 жыл бұрын
thank you sir
@saujan6289
@saujan6289 7 жыл бұрын
Thank you
How to Reverse a String in Java
10:26
Telusko
Рет қаралды 194 М.
#58 Object Class equals toString hashcode in Java
12:00
Telusko
Рет қаралды 94 М.
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 57 МЛН
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 24 МЛН
8.11 What is Super Keyword in Java Part 1
6:35
Telusko
Рет қаралды 179 М.
Java Strings are Immutable - Here's What That Actually Means
7:06
Coding with John
Рет қаралды 607 М.
Java toString method 🎉
6:39
Bro Code
Рет қаралды 89 М.
Difference Between "== Operator" And "equals() Method" In Java (Hindi)
15:02
13.7 Multithreading Synchronized Keyword
10:17
Telusko
Рет қаралды 433 М.
Stream API in Java
26:04
Telusko
Рет қаралды 289 М.
Java Polymorphism Fully Explained In 7 Minutes
7:16
Coding with John
Рет қаралды 299 М.
Java toString Method Explained | NareshIT
3:17
Naresh i Technologies
Рет қаралды 1 М.
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 57 МЛН