Created
March 1, 2021 09:40
-
-
Save Alkimisti/9479c1148851b83eaadbc9b2e4cca350 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ObjectToString { | |
public static void main(String[] args) { | |
Klasa k = new Klasa(); | |
String s1 = k.toString(); | |
System.out.println(s1); | |
String s2 = String.valueOf(s1); | |
System.out.println(s2); | |
} | |
} | |
class Klasa{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment