- What is CodeHS?
- Curriculum
- Platform
- Assignments
- Classroom Management
- Grading
- Gradebook
- Progress Tracking
- Lesson Plans
- Offline Handouts
- Problem Guides
- Practice
- Create
- Problem Bank
- Playlist Bank
- Quiz Scores
- Rostering
- Integrations
- Professional Development
- Stories
- Standards
- States
- Alabama
- Alaska
- Arizona
- Arkansas
- California
- Colorado
- Connecticut
- D.C.
- Delaware
- Florida
- Georgia
- Hawaii
- Idaho
- Illinois
- Indiana
- Iowa
- Kansas
- Kentucky
- Louisiana
- Maine
- Maryland
- Massachusetts
- Michigan
- Minnesota
- Mississippi
- Missouri
- Montana
- Nebraska
- Nevada
- New Hampshire
- New Jersey
- New Mexico
- New York
- North Carolina
- North Dakota
- Ohio
- Oklahoma
- Oregon
- Pennsylvania
- Rhode Island
- South Carolina
- South Dakota
- Tennessee
- Texas
- Utah
- Vermont
- Virginia
- Washington
- West Virginia
- Wisconsin
- Wyoming
- State Standards
- Plans
- Resources
- Districts
- Share
- Contact Us
- Company
AP CSA: VAR-1.E.12
CodeHS Lessons
The following String methods and constructors—including what they do and when they are used—are part of the Java Quick Reference— ● String(String str) —Constructs a new String object that represents the same sequence of characters as str ● int length()—returns the number of characters in a String object ● String substring(int from, int to)—returns the substring beginning at index from and ending at index to – 1 ● String substring(int from) —returns substring(from, length()) ● int indexOf(String str) —returns the index of the first occurrence of str; returns -1 if not found ● boolean equals(String other) —returns true if this is equal to other; returns false otherwise ● int compareTo(String other) —returns a value < 0 if this is less than other; returns zero if this is equal to other; returns a value > 0 if this is greater than other
Standard |
2.8 String Methods |
Standard |
3.5 Strings Methods |
Standard |
3.8 String Methods |
Standard |
5.5 Strings Methods |
Standard |
8.8 String Methods |
Standard |
8.8 String Methods |
Standard |
5.5 Strings Methods |
- What is CodeHS?
- Curriculum
- Platform
- Assignments
- Classroom Management
- Grading
- Gradebook
- Progress Tracking
- Lesson Plans
- Offline Handouts
- Problem Guides
- Practice
- Create
- Problem Bank
- Playlist Bank
- Quiz Scores
- Rostering
- Integrations
- Professional Development
- Stories
- Standards
- States
- Alabama
- Alaska
- Arizona
- Arkansas
- California
- Colorado
- Connecticut
- D.C.
- Delaware
- Florida
- Georgia
- Hawaii
- Idaho
- Illinois
- Indiana
- Iowa
- Kansas
- Kentucky
- Louisiana
- Maine
- Maryland
- Massachusetts
- Michigan
- Minnesota
- Mississippi
- Missouri
- Montana
- Nebraska
- Nevada
- New Hampshire
- New Jersey
- New Mexico
- New York
- North Carolina
- North Dakota
- Ohio
- Oklahoma
- Oregon
- Pennsylvania
- Rhode Island
- South Carolina
- South Dakota
- Tennessee
- Texas
- Utah
- Vermont
- Virginia
- Washington
- West Virginia
- Wisconsin
- Wyoming
- State Standards
- Plans
- Resources
- Districts
- Share
- Contact Us
- Company