If you are not sure if the website you would like to visit is secure, you can verify it here. Enter the website address of the page and see parts of its content and the thumbnail images on this site. None (if any) dangerous scripts on the referenced page will be executed. Additionally, if the selected site contains subpages, you can verify it (review) in batches containing 5 pages.
favicon.ico: nipafx.dev/java-13-text-blocks - Definitive Guide To Text Block.

site address: nipafx.dev/java-13-text-blocks/ redirected to: nipafx.dev/java-13-text-blocks

site title: Definitive Guide To Text Blocks In Java 13 // nipafx

Our opinion (on Monday 13 July 2026 14:24:05 UTC):

GREEN status (no comments) - no comments
After content analysis of this website we propose the following hashtags:


Hashtags existing on this website:




Meta tags:
description=Java 13 introduces text blocks: string literals that span multiple lines. Learn about syntax, indentation, escape sequences, and formatting.;
keywords=text blocks;

Headings (most frequently used words):

and, text, white, space, of, ness, definitive, guide, to, blocks, in, java, 13, block, syntax, delimiter, semantics, indentation, odds, ends, reflection, adding, essential, removing, incidental, indenting, methods, an, exercise, for, the, reader, escape, sequences, newline, details, even, more, like, literals, orthogonality, line, raw, interpolation, variables, expressions,

Text of the page (most frequently used words):
the (183), text (84), and (73), blocks (72), string (68), hello (62), java (54), that (43), indentation (34), line (33), you (32), multiline (30), #delimiter (26), space (26), closing (25), lines (24), with (24), are (22), this (22), white (22), content (20), like (17), literals (17), for (17), newline (17), all (16), project (16), escape (15), your (15), compiler (14), can (14), use (14), code (13), indent (12), sequences (12), but (12), block (12), out (12), one (12), ness (11), not (11), more (11), there (11), essential (11), just (10), same (10), even (10), greeting (10), incidental (9), its (9), own (9), raw (9), want (9), add (8), spaces (8), strings (8), new (8), let (8), phrase (8), them (8), need (8), println (8), system (8), tab (8), audience (8), punctuation (8), source (7), does (7), which (7), last (7), because (7), two (7), blog (7), post (7), stripindent (6), methods (6), place (6), jep (6), have (6), span (6), right (6), reflection (6), adjective (6), they (6), has (6), three (6), four (6), change (6), license (5), method (5), exactly (5), format (5), formatted (5), into (5), each (5), removes (5), manually (5), opening (5), ends (5), end (5), true (5), though (5), example (5), features (5), know (5), get (5), syntax (5), literal (5), equals (5), will (5), always (5), first (5), second (5), without (5), look (5), moving (5), remove (5), leading (5), junit (5), instance (4), also (4), delimiters (4), guide (4), move (4), left (4), how (4), adding (4), course (4), resulting (4), additional (4), newlines (4), contains (4), feature (4), value (4), less (4), thing (4), variables (4), expressions (4), interpolation (4), about (4), some (4), point (4), after (4), other (4), much (4), matter (4), what (4), their (4), details (4), case (4), where (4), instead (4), when (4), blockphrase (4), share (4), now (4), removed (4), here (4), check (4), examples (4), see (4), semantics (4), community (4), turn (3), translateescapes (3), added (3), few (3), breaks (3), from (3), only (3), translated (3), seems (3), good (3), recommend (3), usually (3), several (3), 355 (3), show (3), final (3), already (3), single (3), way (3), ___ (3), take (3), may (3), say (3), effect (3), orthogonality (3), since (3), equal (3), whether (3), windows (3), endings (3), files (3), work (3), different (3), doesn (3), don (3), alignment (3), multiple (3), quotation (3), marks (3), odds (3), again (3), yourself (3), exercise (3), reader (3), indents (3), works (3), determines (3), indenting (3), put (3), result (3), start (3), property (3), many (3), exact (3), removing (3), why (3), follow (3), definitive (3), basics (3), pioneer (3), demos (3), streams (3), core (3), clean (3), privacy (2), rss (2), stackoverflow (2), github (2), twitch (2), youtube (2), discord (2), mastodon (2), bluesky (2), static (2), means (2), u000a (2), discouraged (2), aside (2), style (2), formatter (2), statements (2), then (2), align (2), manage (2), position (2), relative (2), adds (2), allows (2), begins (2), 2019 (2), little (2), was (2), acceptable (2), world (2), opposite (2), making (2), looks (2), combine (2), these (2), both (2), interesting (2), reason (2), over (2), identical (2), prints (2), thus (2), time (2), managed (2), crlf (2), ending (2), policy (2), those (2), still (2), having (2), language (2), most (2), unnecessary (2), sequence (2), embed (2), least (2), everything (2), happens (2), indentphrase (2), indentedphrase (2), bought (2), literalphase (2), either (2), common (2), considered (2), far (2), shared (2), blank (2), trailing (2), characters (2), once (2), character (2), non (2), trivial (2), treat (2), fixed (2), intuitive (2), unindent (2), seen (2), formatting (2), meaningful (2), json (2), putting (2), appends (2), require (2), compile (2), error (2), double (2), accepted (2), past (2), another (2), table (2), active (2), various (2), platforms (2), watch (2), notified (2), publish (2), play (2), around (2), repository (2), snippets (2), shown (2), permissive (2), reuse (2), projects (2), showcasing (2), important (2), demo (2), src (2), talks (2), libfx (2), record (2), args (2), var (2), year (2), tools (2), techniques (2), switch (2), serialization (2), records (2), valhalla (2), panama (2), loom (2), leyden (2), amber (2), performance (2), patterns (2), pattern (2), matching (2), optional (2), ramp (2), migration (2), meta (2), maven (2), libraries (2), lambda (2), javafx (2), next (2), j_ms (2), generics (2), dop (2), documentation (2), deprecation (2), libs (2), collections (2), architecture (2), tags (2), javascript (2), contact, imprint, behaving, aware, normalizes, file, before, translating, created, interned, needs, escaped, fortunately, been, fluke, oracle, official, endorses, generally, read, programmer, strongly, suggests, disagree, followed, part, due, september, preview, calling, equivalent, convenient, looking, forward, mass, search, replace, context, approach, barely, becomes, possible, solutions, messageformat, ugh, reliance, too, horrible, concatenation, somewhat, greetingservice, getgreeting, direction, processed, give, processing, power, letting, interpolate, flexible, hope, fully, orthogonal, surprising, connections, between, crop, rawliteral, rawblock, prefixing, made, spot, zero, chance, becoming, reality, indistinguishable, compilation, really, absolutely, intended, independent, related, pool, reduce, memory, consumption, turns, lot, includes, interns, regarding, twice, create, visible, bytecode, run, via, topic, promise, normalized, expands, discussed, earlier, achieve, speaking, behave, fact, normalizing, real, unix, trouble, squaring, special, exist, wake, call, regular, except, allowing, forego, cases, rarely, mean, old, school, step, described, above, horizontal, vertical, programmatic, access, translation, whole, idea, behind, across, quotationmarks, pick, usual, smaller, safely, full, bullet, points, guess, otherwise, try, wonder, further, people, who, literalphrase, allow, handle, ever, hand, construct, load, request, unknown, mark, finally, route, half, results, determined, based, gets, entirely, third, positioning, six, curly, braces, front, remains, untoched, leads, removal, while, keeping, within, intact, called, containing, included, significant, smallest, numbers, ignoring, kind, count, number, counts, aren, whitespace, riddance, fairly, algorithm, deserves, gist, glossed, directly, considers, else, continued, commonly, suggest, preserved, showed, ways, editor, artifact, meant, sets, determine, touching, indented, according, surrounding, meaningless, developer, shows, obvious, indeed, unlike, beginning, semantically, decision, bases, continuing, statement, conserve, quite, follower, would, mix, tabs, alignments, changing, requires, entire, starting, note, assumes, starts, plus, itself, output, changes, yes, almost, come, placing, makes, difference, places, getting, dive, similar, languages, channel, inner, duke, ignore, moment, free, mind, variant, straightforward, introduced, any, bells, whistles, variable, expression, thanks, early, 2020, fast, releases, cooler, embedding, wait, did, version, previews, toc, contents, lic, artist, dev, introduces, slides, upcoming, schedule, recordings, virtual, threads, vector, structured, concurrency, lilliput, galahad, babylon, openjdk, conversation, book, club, videos, jms, newsletter, posts, testing, rant, jigsaw, jdeps, impulse, default, lang, review, comments, words, site, well, better, enabled, nipafx,


Text of the page (random words):
on of variables and expressions reflection s f share this post with your community i m active on various platforms watch this space or follow me there to get notified when i publish new content new version new feature java 13 previews text blocks string literals that can span multiple lines system out println hello multiline text blocks prints hello multiline text blocks wait where did the indentation go a much cooler example is embedding another language say json string phrase greeting hello audience text blocks punctuation text blocks are a straightforward feature introduced by jep 355 without any bells and whistles no raw strings and no variable or even expression interpolation all we get now are literals that span several lines raw strings are on the table though and thanks to the fast releases we may see them as early as 2020 but that s for another post in this one we ll dive into text blocks if you know similar features from other languages channel your inner duke and ignore them for a moment to free your mind for java s variant text block syntax let s start with getting text blocks past the compiler accepted in the exact same places where a string literal like this one is accepted begins with three double quotation marks and a newline that s the opening delimiter ends with three double quotation marks that s the closing delimiter these can be on the last line of content or on their own line which makes a difference we ll come to placing the closing in a second first here are a few examples string hello hello multiline text blocks hello multiline text blocks almost the same but different semantics hello hello multiline text blocks hello multiline text blocks yes there s a newline at the end newline at the start hello hello multiline text blocks hello multiline text blocks compile error no newline after hello hello multiline text blocks compile error no closing hello hello multiline text blocks because a text block starts with plus a newline the newline itself does of course not show up in the output but you can already see how the closing delimiter s position changes the string let s look into that delimiter semantics as we ve seen starting a text block is trivial just one thing to note the jep s examples show and its text even assumes an alignment of content with opening delimiter system out println hello multiline text blocks but why most java code bases indent continuing lines of a statement with two more indents i use only one in the blog to conserve space and i see no reason to change that here quite the opposite as a follower of the one true indentation this would require me to mix tabs and spaces that aside this alignments either breaks when changing the opening line or requires to change the indentation of the entire text block once again why just don t unlike beginning a text block ending it seems to require a semantically meaningful decision have a look at this system out println hello multiline text blocks hello multiline text blocks system out println hello multiline text blocks hello multiline text blocks system out println hello multiline text blocks hello multiline text blocks system out println hello multiline text blocks hello multiline text blocks the second example shows that putting a text block s closing delimiter on its own line appends a newline to the end of the resulting string the last two examples are a little less obvious it looks like moving the closing delimiter to the left or the content to the right has the same effect additional indentation of the final string that s indeed the case let s see why and how putting the closing delimiter on its own line appends a newline and indentation text blocks will usually be indented according to the surrounding code and that indentation is meaningless or incidental for the resulting string at the same time the developer may add additional meaningful or essential white space like in this json example string phrase greeting hello audience text blocks punctuation the first indent a tab in my editor four spaces in the blog is an artifact of code formatting but the second indent on the three property lines is meant to be there and so the compiler sets out to determine incidental white space and remove it without touching on essential white space adding essential white space as we ve seen indentation of only some of the lines is considered essential and thus preserved but indentation shared by all lines is removed but some of the examples already showed that there are two ways to indent all lines moving the closing delimiter to the left moving the content to the right string hello hello text blocks hello text blocks string hello hello text blocks hello text blocks string hello hello text blocks hello text blocks jep 355 seems to suggest moving the closing delimiter to change the string s indentation want to indent the string unindent the want to unindent the string indent the not exactly intuitive instead i recommend to let your formatter place the closing as it usually does for continued statements commonly two more indents and treat it as fixed in place now if you want to change the string s indentation you have to change the lines you want to indent much more intuitive i d say treat the closing delimiter as fixed in place and change the content s indentation so far we ve glossed over how exactly the compiler determines essential white space though it doesn t do that directly instead it removes incidental white space and considers everything else essential removing incidental white space the compiler removes indentation in a fairly interesting and non trivial algorithm that deserves its own blog post but the gist is all trailing whitespace is removed and good riddance for leading white space check all non blank lines i e lines that aren t just white space count the number of leading white space characters in each the exact character doesn t matter i e a space counts exactly as much as a tab take the smallest of those numbers and remove that many white space characters from each line once again ignoring the exact kind of character the result is that at least one of the lines has no leading white space in what s called a significant trailing line policy the line containing the closing is always included in that check even though it is blank if is on its own line the second point leads to the removal of shared leading white space while keeping indentation within the string intact string phrase greeting hello audience text blocks punctuation the compiler has six lines to look at opening and closing curly braces three property lines and closing delimiter line and determines that there s a tab four spaces in front of each of them so they get removed the property lines additional indentation remains untoched greeting hello audience text blocks punctuation so far so good now let s look at the third point it s the one that allows us to add leading white space to all lines by positioning the content relative to the closing delimiter let s start here string hello hello multiline text blocks the block contains a single line of content and so incidental indentation is determined based on it and the line with the closing both have the same indentation one tab four spaces and so it gets removed entirely the result is hello multiline text blocks n now we move the content to the right string hello hello multiline text blocks the common white space is still one tab or four spaces and so the other half of the content line s indentation is considered essential which results in hello multiline text blocks n if we instead move the closing delimiter to the left string hello hello multiline text blocks we take a different route no common white space to the same result one tab four spaces of essential indentation finally if the closing delimiter is on the last content line string hello hello multiline text blocks there is no way to mark some of the indentation as essential and so the compiler will always remove all of the white space that all lines share that means if you want to indent all lines you need to put the on its own line which adds a newline to the end of your string if you don t want that newline you either put the closing delimiter on its own line and remove the newline manually put the closing delimiter on the last line of content and add indentation manually without closing delimiter on its own line you can t add indentation manually indenting methods there are two methods on string that allow you to handle indentation manually the first is java 13 s stripindent which determines and removes incidental white space exactly as the compiler does so in case you ever hand construct load or request a string with unknown indentation and want to remove it stripindent is there for you string literalphrase n greeting hello n audience text blocks n punctuation n n string blockphrase greeting hello audience text blocks punctuation not equal because the compiler removes blockphrase s indentation literalphase equals blockphrase equal because stripindent works like the compiler literalphase stripindent equals blockphrase people who bought stripindent also bought indent since java 12 string indentphrase greeting hello audience text blocks punctuation indent 4 string indentedphrase greeting hello audience text blocks punctuation this is true in the blog where indents are four spaces indentphrase equals indentedphrase an exercise for the reader in case you wonder what happens when moving the delimiter further to the right string hello hello multiline text blocks have a look at the bullet points again you know everything you need to guess what happens otherwise try it yourself odds and ends as usual there are a few smaller details to go into so you can use the feature safely and to full effect escape sequences because the delimiters are you can embed and without having to escape them for three quotation marks you need to escape at least one and i recommend to pick the first string quotationmarks one two three and since the whole idea behind text blocks are their span across multiple lines it is of course unnecessary to embed the newline escape sequence n just add newlines to the source code instead that doesn t mean that they don t work though all escape sequences are translated just like in old school string literals this is the final step after indentation was managed as described above so you can use this to manage horizontal alignment with b or t and vertical alignment with n f and r more on that in a second by the way if you need programmatic access to escape sequence translation use the new string translateescapes escape sequences are translated just like in string literals string tab t translateescapes this is true t equals tab of course and n also work in text blocks it s just that their use is discouraged because you rarely need them so in case you re still having trouble squaring text blocks with other language s raw strings where no special sequences exist this is your wake up call text blocks work just like regular java string literals except that they have a different delimiter allowing you to forego in most cases and can span several lines making n unnecessary newline details speaking of newlines no matter what line ending policy your source files use the compiler will always behave the same in fact the first thing it does is normalizing real line breaks i e not those added with escape sequences to lf n u000a so no matter whether your files use cr crlf windows or lf unix your text blocks will always use lf i e their lines end in n no matter whether your source files use cr crlf or lf your text blocks always use lf after the compiler normalized line endings and managed indentation it expands escape sequences like discussed earlier and you can use that to achieve the line endings you need string windows windows r line r endings r even more like literals two more on the topic of text blocks are like string literals i promise they re the last whether you create a string with a literal or a text block will not be visible in the resulting bytecode and thus also not at run time e g via reflection literals and text blocks are so much the same that they can be identical regarding the last point this prints true twice string hello hello text blocks string literal hello text blocks system out println equal hello equals literal system out println identical hello literal the reason is that the compiler interns strings into to a pool to reduce memory consumption turns out we use a lot of the same strings all over the place and since java 13 this includes text blocks orthogonality of line ness and raw ness that literals and text blocks are indistinguishable after compilation has a really interesting and absolutely intended effect the multiline ness of text blocks vs the single line ness of literals is independent of other string related features take raw strings as an example which know no escape sequences at some point we may get them in java say by prefixing ___ to a string i made that syntax up on the spot there s zero chance of it becoming reality then you can combine that with both literals or text blocks string rawliteral ___ f o o string rawblock ___ f o o looks like a flexible way to combine these features let s just hope they ll be fully orthogonal and no surprising connections between line ness and raw ness crop up that we need to know about interpolation of variables and expressions the opposite direction of making strings raw i e less processed is to give them more processing power for example by letting them interpolate variables or even expressions string greeting hello not a thing string phrase greeting world even less a thing string phrase greetingservice getgreeting world in string literals that s not too horrible because concatenation is somewhat acceptable string adjective single line string phrase hello adjective text blocks because of the text block delimiters reliance on newlines this is not true for text blocks though string adjective multiline ugh string phrase hello adjective text blocks in this new context the approach that was barely acceptable for string literals becomes even less so possible solutions are messageformat format and string format or the new instance method string formatted string adjective multiline string phrase hello s text blocks formatted adjective calling value s formatted value is equivalent to string format value s value but a little more convenient i like it and am already looking forward to mass search replace format with formatted reflection java 13 due in september 2019 contains text blocks as a preview feature a text block begins with followed by a newline that newline is of course not part of the resulting string but additional newlines are ends with on the last line of content or on its own line which adds a n to the end of the string and allows adding indentation to manage indentation with the closing position it ...
Thumbnail images (randomly selected): * Images may be subject to copyright.GREEN status (no comments)

Verified site has: 93 subpage(s). Do you want to verify them? Verify pages:

1-5 6-10 11-15 16-20 21-25 26-30 31-35 36-40 41-45 46-50
51-55 56-60 61-65 66-70 71-75 76-80 81-85 86-90 91-93


The site also has references to the 1 subdomain(s)

  slides.nipafx.dev  Verify


The site also has 1 references to other resources (not html/xhtml )

 nipafx.dev/feed.xml  Verify


Top 50 hastags from of all verified websites.

Supplementary Information (add-on for SEO geeks)*- See more on header.verify-www.com

Header

HTTP/1.1 301 Moved Permanently
Connection close
Content-Length 162
Server GitHub.com
Content-Type text/html
Location htt????/nipafx.dev/java-13-text-blocks/
X-GitHub-Request-Id 7A98:CAEF8:53A920B:548780E:6A54F505
Accept-Ranges bytes
Age 0
Date Mon, 13 Jul 2026 14:24:05 GMT
Via 1.1 varnish
X-Served-By cache-rtm-ehrd2290041-RTM
X-Cache MISS
X-Cache-Hits 0
X-Timer S1783952645.255216,VS0,VE104
Vary Accept-Encoding
X-Fastly-Request-ID ca3b191462cf6255ffe27f0a99647afcc436c204
HTTP/2 200
server GitHub.com
content-type text/html; charset=utf-8
last-modified Mon, 13 Jul 2026 02:04:20 GMT
access-control-allow-origin *
etag W/ 6a5447a4-3419a
expires Mon, 13 Jul 2026 14:34:05 GMT
cache-control max-age=600
content-encoding gzip
x-proxy-cache MISS
x-github-request-id A4AA:2F61C1:515CB80:523AC1A:6A54F505
accept-ranges bytes
age 0
date Mon, 13 Jul 2026 14:24:05 GMT
via 1.1 varnish
x-served-by cache-rtm-ehrd2290033-RTM
x-cache MISS
x-cache-hits 0
x-timer S1783952645.399825,VS0,VE118
vary Accept-Encoding
x-fastly-request-id eea2c7a64f60a22378a556aedcb1d610e385347e
content-length 50559

Meta Tags

title="Definitive Guide To Text Blocks In Java 13 // nipafx"
charset="utf-8"
http-equiv="x-ua-compatible" content="ie=edge"
name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"
name="generator" content="Gatsby 5.7.0"
data-react-helmet="true" name="description" content="Java 13 introduces text blocks: string literals that span multiple lines. Learn about syntax, indentation, escape sequences, and formatting."
data-react-helmet="true" name="twitter:card" content="summary_large_image"
data-react-helmet="true" name="twitter:site" content="@nipafx"
data-react-helmet="true" name="twitter:creator" content="@nipafx"
data-react-helmet="true" name="twitter:title" content="Definitive Guide To Text Blocks In Java 13 // nipafx"
data-react-helmet="true" name="twitter:description" content="Java 13 introduces text blocks: string literals that span multiple lines. Learn about syntax, indentation, escape sequences, and formatting."
data-react-helmet="true" name="twitter:image" content="htt????/nipafx.dev/static/ee7f5c0e38878fe9af46f69e9bbd789a/a931e/text-blocks.jpg"
data-react-helmet="true" name="keywords" content="text blocks"
data-react-helmet="true" property="og:title" content="Definitive Guide To Text Blocks In Java 13 // nipafx"
data-react-helmet="true" property="og:type" content="article"
data-react-helmet="true" property="og:image" content="htt????/nipafx.dev/static/ee7f5c0e38878fe9af46f69e9bbd789a/a931e/text-blocks.jpg"
data-react-helmet="true" property="og:url" content="htt????/nipafx.dev/java-13-text-blocks/"
data-react-helmet="true" property="og:description" content="Java 13 introduces text blocks: string literals that span multiple lines. Learn about syntax, indentation, escape sequences, and formatting."
data-react-helmet="true" property="og:site_name" content="nipafx // You. Me. Java."
name="theme-color" content="#69ea7d"

Load Info

page size50559
load time (s)0.367874
redirect count1
speed download137762
server IP 185.199.108.153
* all occurrences of the string "http://" have been changed to "htt???/"