Inspect one character
char stores one UTF-16 code unit. Character provides utility methods such as isDigit, isLetter, and case conversion.
Industry: checking input characters, parsing codes, and text transformations.
Explore how Java handles text, validates input, persists data, serializes objects, and builds desktop interfaces. Learn by changing values, running mini-simulations, and connecting each concept to software used in the IT industry.
String input = "Build";
StringBuilder app = new StringBuilder(input);
app.append(" something");
System.out.println(app);Applications receive text constantly: names, search queries, form fields, log messages, and identifiers. Correct text handling improves reliability, usability, and security.
char stores one UTF-16 code unit. Character provides utility methods such as isDigit, isLetter, and case conversion.
Industry: checking input characters, parsing codes, and text transformations.
A String cannot be changed after creation. Methods such as concat return a result; they do not mutate the original object.
Industry: safer sharing of text values, configuration, and identifiers.
StringBuilder is mutable. Its append, insert, delete, and reverse methods update a character sequence.
Industry: building reports, CSV output, and repeated string changes.
Change the starting text and append a phrase. Watch which value changes.
s.concat("!") returns a new String. If its return value is not assigned, s remains unchanged. sb.append("!") changes the builder.Enter one character to explore common Character checks.
Java char represents a UTF-16 code unit, not every possible Unicode symbol as one unit. Some symbols require a surrogate pair.
Tokenization divides a string into smaller pieces. Common use: parsing CSV-like input, tags, or delimited records. Production CSV needs a CSV parser when quoting/escaping rules apply.
Regex describes a pattern. Try the supplied pattern and input; the demo uses browser regex syntax to illustrate the idea.
length()
number of UTF-16 code units
charAt(i)
unit at index i
substring(a,b)
from a up to, not including, b
indexOf(x)
first matching index or -1
equals(x)
content equality
compareTo(x)
lexicographic comparison
equals() to compare content; == checks whether references point to the same object.Programs need durable storage so data survives after the application closes. RAM is volatile; files and other storage are designed for persistence.
Simulate writing and reading a text file. The browser keeps this demo in page memory only; it does not write to your computer.
Use try-with-resources in modern Java to close streams reliably, including when an exception occurs.
Choose a task to see an appropriate family of APIs.
FileReader, FileWriter, BufferedReader, and BufferedWriter work with character data. Set an explicit charset for predictable text encoding.
java.io contains classic stream and reader/writer APIs. java.nio.file provides Path, Files, and directory/file operations.Explore the kind of metadata a file utility might show. Values below are illustrative, not actual files on your device.
Real metadata calls can throw I/O or permission exceptions. Check the exact API and platform behavior.
Serialization converts an object graph into a byte representation. In Java, Serializable marks eligible classes; object streams write/read the representation.
JFileChooser lets a desktop Java app ask the user to select a file or directory. Simulate the decision flow.
Select a sample file:
No file selected.
A desktop inventory tool must save item records, load them on startup, and let a user choose an export destination.
Graphical user interface components turn program logic into controls people can understand and operate. Good UI design makes tasks discoverable, consistent, and efficient.
Select a numeric value within a range. Useful for volume, brightness, zoom, or threshold controls.
Offer relevant actions near the selected item, often on right-click. Keep essential actions discoverable elsewhere too.
Support multiple internal windows inside a main window—an MDI-style workspace for specialized desktop tools.
Separate related content, such as Home, Settings, and Help, without opening a new top-level window for every section.
Arrange components vertically with Y_AXIS or horizontally with X_AXIS.
Match the control to the task, provide feedback, support keyboard use, and avoid hiding critical actions in context menus.
Drag the slider to change a simulated system volume. This mimics the interaction; Java Swing code is shown below.
Right-click the item below (or use the button for touch devices) to open contextual actions.
Right-click this workspace to open a simulated context menu.
Click each tab. Tabs organize related views in one container.
Project status, recent activity, and key actions appear here.
Open, minimize, maximize, or close simulated internal windows. This illustrates the role of JDesktopPane and JInternalFrame.
Constructor flags are: resizable, closable, maximizable, iconifiable—in that order.
Switch between vertical and horizontal arrangement. The browser demo illustrates the layout concept.
Choose a user requirement and match it to a Swing component.
Answer each question, then check feedback. The goal is to explain why an approach fits—not just memorize a definition.
This page cannot reliably prevent browser Developer Tools, View Source, or inspection of downloaded HTML and JavaScript. Browser-side code is delivered to the visitor's device, so determined users can inspect or modify it. Avoid putting secrets, credentials, or sensitive data in this file. For protected data or graded assessments, use server-side validation and authorization.