#tostring — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #tostring, aggregated by home.social.
-
Wer in Java eigene Klassen schreibt, kommt früher oder später an den Punkt, an dem `equals()`, `hashCode()` und `toString()` relevant werden. Diese drei Methoden stammen alle aus der Klasse `Object`, also der obersten Basisklasse in Java. Deshalb hat jede Klasse sie automatisch - aber oft reicht d
https://magicmarcy.de/equals-hashcode-und-tostring-richtig-implementieren
#equals #hashCode #toString #Basisklasse #Grundlagen #Object #vergleichen #Collections #Hash-basiert
-
Wer in Java eigene Klassen schreibt, kommt früher oder später an den Punkt, an dem `equals()`, `hashCode()` und `toString()` relevant werden. Diese drei Methoden stammen alle aus der Klasse `Object`, also der obersten Basisklasse in Java. Deshalb hat jede Klasse sie automatisch - aber oft reicht d
https://magicmarcy.de/equals-hashcode-und-tostring-richtig-implementieren
#equals #hashCode #toString #Basisklasse #Grundlagen #Object #vergleichen #Collections #Hash-basiert
-
Wer in Java eigene Klassen schreibt, kommt früher oder später an den Punkt, an dem `equals()`, `hashCode()` und `toString()` relevant werden. Diese drei Methoden stammen alle aus der Klasse `Object`, also der obersten Basisklasse in Java. Deshalb hat jede Klasse sie automatisch - aber oft reicht d
https://magicmarcy.de/equals-hashcode-und-tostring-richtig-implementieren
#equals #hashCode #toString #Basisklasse #Grundlagen #Object #vergleichen #Collections #Hash-basiert
-
Fun with #JavaScript
10:55:59.519 Symbol("t").toString()
10:55:59.536 "Symbol(t)"
10:56:06.138 [Symbol("t")].toString()
10:56:06.157 Uncaught TypeError: can't convert symbol to string🤔 🤷 🫤 oh, well, you could, just one line up.
Reason: The Array.toString() has a trip through Array.join() which uses the Ecmascript ToString abstraction which, for whatever reason, is defined as: if Symbol then throw. 💥
-
Fun with #JavaScript
10:55:59.519 Symbol("t").toString()
10:55:59.536 "Symbol(t)"
10:56:06.138 [Symbol("t")].toString()
10:56:06.157 Uncaught TypeError: can't convert symbol to string🤔 🤷 🫤 oh, well, you could, just one line up.
Reason: The Array.toString() has a trip through Array.join() which uses the Ecmascript ToString abstraction which, for whatever reason, is defined as: if Symbol then throw. 💥
-
Numbers Can Call Methods With .. ?!
🤯 WAIT WHAT?! You can call methods on numbers using TWO dots: 42..toString()! First dot = decimal, second = method. Convert to binary: 8..toString(2) = '1000'! Share this NOW!
#javascript #javascripttricks #codingchallenge #numbermethods #tostring #javascriptquiz #javascriptweird #javascriptwtf #codingtips #javascriptshorts
-
Wer in Java eigene Klassen schreibt, kommt früher oder später an den Punkt, an dem `equals()`, `hashCode()` und `toString()` relevant werden. Diese drei Methoden stammen alle aus der Klasse `Object`, also der obersten Basisklasse in Java. Deshalb hat jede Klasse sie automatisch - aber oft reicht d
https://magicmarcy.de/equals-hashcode-und-tostring-richtig-implementieren
#equals #hashCode #toString #Basisklasse #Grundlagen #Object #vergleichen #Collections #Hash-basiert
-
Wer in Java eigene Klassen schreibt, kommt früher oder später an den Punkt, an dem `equals()`, `hashCode()` und `toString()` relevant werden. Diese drei Methoden stammen alle aus der Klasse `Object`, also der obersten Basisklasse in Java. Deshalb hat jede Klasse sie automatisch - aber oft reicht d
https://magicmarcy.de/equals-hashcode-und-tostring-richtig-implementieren
#equals #hashCode #toString #Basisklasse #Grundlagen #Object #vergleichen #Collections #Hash-basiert
-
Wer in Java eigene Klassen schreibt, kommt früher oder später an den Punkt, an dem `equals()`, `hashCode()` und `toString()` relevant werden. Diese drei Methoden stammen alle aus der Klasse `Object`, also der obersten Basisklasse in Java. Deshalb hat jede Klasse sie automatisch - aber oft reicht d
https://magicmarcy.de/equals-hashcode-und-tostring-richtig-implementieren
#equals #hashCode #toString #Basisklasse #Grundlagen #Object #vergleichen #Collections #Hash-basiert
-
Be inspired, to quote a colleague of mine… I was debugging something (and we all know, that safes you from hours of reading documentation), and I noticed that #jOOQs parsing context indicates its position in the #toString method.
How helpful is that?
Well done, @lukaseder !
-
Be inspired, to quote a colleague of mine… I was debugging something (and we all know, that safes you from hours of reading documentation), and I noticed that #jOOQs parsing context indicates its position in the #toString method.
How helpful is that?
Well done, @lukaseder !
-
Be inspired, to quote a colleague of mine… I was debugging something (and we all know, that safes you from hours of reading documentation), and I noticed that #jOOQs parsing context indicates its position in the #toString method.
How helpful is that?
Well done, @lukaseder !
-
Be inspired, to quote a colleague of mine… I was debugging something (and we all know, that safes you from hours of reading documentation), and I noticed that #jOOQs parsing context indicates its position in the #toString method.
How helpful is that?
Well done, @lukaseder !
-
Be inspired, to quote a colleague of mine… I was debugging something (and we all know, that safes you from hours of reading documentation), and I noticed that #jOOQs parsing context indicates its position in the #toString method.
How helpful is that?
Well done, @lukaseder !