✕ Close

Week 15 · 15.4 · Thu, Nov 12 · The Bigger Picture: ACT-style reading

Letters as Numbers: From ASCII to Java's Strings

1 This section explains how computers came to store text as numbers, and how Java joins pieces of text into one longer piece.

Java Around Us

2 Java is the language on the class benches. In November 2026, the TIOBE index, which counts how often each language shows up in search results, ranked Java third, just ahead of C++.

3 Few students who read Java will write it for a job, but many use things built with it. A Netflix engineer has said that every backend at Netflix, the server program that works after a person taps the app, is basically a Java app. Minecraft has a Java Edition, and Android apps can be written in Java.

Letters Become Numbers

4 A computer does not store a letter the way a person writes one. The Unicode Consortium puts it simply: computers deal with numbers, and they store letters and other symbols by giving each one a number. Each letter, digit, space or mark that a computer stores in this way is called a character. For a message to travel from one machine to another, both machines have to agree on which number stands for which character. Without that agreement, the same numbers could print as different letters on another machine.

5 In the United States, that agreement became ASCII, the American Standard Code for Information Interchange. Work on the standard began on October 6, 1960, and a subcommittee of the American Standards Association published its first edition in 1963. ASCII grew out of earlier telegraph codes. It defines 128 characters, each stored as a 7-bit number, and 33 of them are control characters that do not print. Its first widespread use was on AT&T's teletypewriter network, on machines called Teletype Model 33 teleprinters. A major revision followed in 1967, and the IEEE, an organization of engineers, later named ASCII a milestone because it gave the telephone and computer industries a standard they shared.

One Number for Every Character

6 ASCII was built around the Latin alphabet, and its 128 characters had no room for the letters of many of the world's other languages. In late 1987, engineers from Apple and Xerox began a project to fix that, and Unicode, Inc. was incorporated in California on January 3, 1991. Unicode's goal is a unique number for every character, no matter which computer, program or language is used. Unicode kept ASCII's numbers for the characters ASCII already had, so the capital letter A is the number 65 in both codes, B is 66, and a space is 32. Figure 1 shows these numbers.

7 Java was built on Unicode. Oracle's Java tutorial describes Java's char type as a single 16-bit Unicode character. Text in Java is held in a string, a row of characters kept in order. A string literal is a series of characters written between double quotation marks, such as "Who Dat". A string's length() method counts its characters, and a space counts as a character, so "Who Dat".length() is 7.

Joining Strings With +

8 Java's + sign has two jobs. Between two numbers, it adds. When either side is a string, it joins the two sides into one new string, a step called concatenation. The characters of the left side come first, followed by the characters of the right side. If one side is a number, Java first turns that number into text. The lines below join a first name, a space and a last name.

1String first = "Jada";
2String last = "Brown";
3System.out.println(first + " " + last);
Jada Brown

9 The order of the pieces matters. The Java Language Specification says that + works from left to right, whether it is adding or joining. Its own example shows the difference: 1 + 2 + " fiddlers" gives "3 fiddlers", because 1 + 2 is two numbers and is added first, but "fiddlers " + 1 + 2 gives "fiddlers 12", because the left side is already a string, so each number is joined on. Parentheses are worked first, so a program that needs a sum inside a string puts the numbers in parentheses.

10 Today's question asks how a program could put a first name, a space and a last name together into one line of text. Each piece is stored as a string of characters, and the program joins them with +, in order, with the space as its own piece in the middle. On today's bench, each line is predicted the way Java builds it: left to right, adding while both sides are numbers and joining as soon as one side is a string.

Summary

11 Computers store every character as a number. ASCII, published in 1963, gave machines a shared code for 128 characters, and Unicode, begun in 1987, extended the idea to a unique number for every character in every language. Java's strings are rows of Unicode characters. Java's + adds two numbers but joins two strings, a step called concatenation, and it works from left to right, so the order of the pieces changes what prints.

Sources: Unicode Consortium, What Is Unicode? and Summary Narrative; IEEE Engineering and Technology History Wiki, Milestones: American Standard Code for Information Interchange ASCII, 1963; Oracle, The Java Tutorials: Primitive Data Types and Strings; Oracle, The Java Language Specification, Java SE 21 Edition, §15.18; TIOBE, TIOBE Index, November 2026; Bakker, How Netflix Really Uses Java (InfoQ, 2024); Minecraft, The Difference between Java and Bedrock Editions; Android Developers, Android's Kotlin-first approach; course repository, snippets run with the course JDK.

Figure 1. Since 1963 computers have stored every character as a number; a Java string is a row of those characters; and + joins strings from left to right.
ACT-style reading · 9 questions

Read the passage on the left. Answer each question by clicking a choice: the right answer turns green, and a wrong one tells you why. Questions point to paragraph numbers, as on the ACT.

1. Main idea

The main purpose of the passage is to:

2. Detail

According to paragraph 2, why must two machines agree on which number stands for which character?

3. Detail

According to paragraph 3, how many characters does ASCII define, and how many of them do not print?

4. Words in context

As it is used in paragraph 3 ("A major revision followed in 1967"), the word revision most nearly means:

5. Cause and effect

According to paragraph 4, why did engineers begin the Unicode project?

6. Inference

Based on paragraph 4, a file written in ASCII holds the number 65. What letter does a Unicode program show for it?

7. Detail

According to paragraph 5, why is "Who Dat".length() equal to 7?

8. Compare

According to paragraph 7, why does 1 + 2 + " fiddlers" give "3 fiddlers" while "fiddlers " + 1 + 2 gives "fiddlers 12"?

9. Author's claim

Which sentence from the passage best answers how a program could put a first name, a space and a last name into one line of text?