Skip to content

Instantly share code, notes, and snippets.

@nkchauhan003
Created July 29, 2022 17:32
package com.cb;
public class Impl {
public static void main(String[] args) {
// Before Java 15
String json = "{\n" +
" \"name\":\"John\",\n" +
" \"age\":30,\n" +
" \"car\":null\n" +
" }";
// From Java 15
String jsonData = """
{
"name":"John",
"age":30,
"car":null
}
""";
System.out.println(jsonData);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment