Loading course index…

Course navigation & on this page
Strings · Course example

Strings

Original Strings implementation from the supplied Java collection.

Java9 source linescode/Strings.java

Overview

This file is preserved as a supporting course example. Its declarations, methods and comments below are the authoritative description of its behavior.

This reference entry presents original author documentation and source. It is supplementary material, not an additional numbered lecture.

Original course code

Source: code/Strings.java. Original logic, comments, variable names and attribution are retained.

Download Strings.java
Strings.javaJAVA
public class Strings {    public static void main(String[] args) {        System.out.println("The square root of 2.0 is " + Math.sqrt(2.0));    } }