Skip to content

Instantly share code, notes, and snippets.

@sathishjayapal
Created March 24, 2022 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sathishjayapal/9e9e4f080ebe3d2adee39748e8598e3c to your computer and use it in GitHub Desktop.
Save sathishjayapal/9e9e4f080ebe3d2adee39748e8598e3c to your computer and use it in GitHub Desktop.
Java 18 JSON String
package me.sathish;
public class Main {
public static void main(String[] args) {
String simpleJSONData = """
{
"fullName": "%s",
"aadress": "%s",
"title": "%s"
}
""";
System.out.println(simpleJSONData.formatted("Sathish Jayapal", "18 Java version lane", "awesome"));
}
}
@sathishjayapal
Copy link
Author

This is cool from Java 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment