Join Peggy Fisher for an in-depth discussion in this video Using strings, part of Learning Java.
- Strings are technically not a primitive data type.…But since it is used so often, it is sometimes included…when discussing primitive data types.…String variables are stored as an array…or a sequence of characters.…Strings can be a literal constant,…such as the sentence Hello World.…Note that strings are enclosed in double quotes,…while characters are enclosed in single quotes.…They can be defined by using the string data type,…which is again, technically a sequence of characters.…
Two or more strings can be added together…using concatenation.…So you can combine the strings, Hello and World…to create one string Hello World.…It is also possible to break a string up…into smaller pieces using the substring methods.…A substring can be a single character, the entire string,…or some portion of the string.…We can obtain the length of any string…using a method called length.…We will discuss these methods shortly.…Let's revisit our program to calculate the cost of a trip.…
This time, we will modify the program to ask the user…
- Downloading and exploring NetBeans
- Understanding Java basics: data types, strings, arrays, and more
- Controlling flow with functions and loops
- Creating classes
- Sorting and searching arrays
- Manipulating files
- Handling errors
- Building GUIs
Skill Level Beginner
1. Getting Started
2. Java Basics
3. Flow of Control
4. Classes and Objects
5. Beyond the Basics
6. File Manipulation
7. Graphical User Interface Basics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.