Exercises, examples and other material relating to training module J707. This topic is presented on public courses Learning to Program in Java
, Java Bootcamp
, Java Programming for the Web
Java supports a Unicode character set that allows for more than 65,000 different characters. Single characters can be held in char variables, and multiple character sequences (strings) can be held in char arrays, StringBuffer objects and String objects.
Related technical and longer articlesAnalysing incoming data lines
|Articles and tips on this subject||updated|
|4414||Java - converting an integer to a fixed length string|
There are some things in Java which you would think are no-brainers (one-liners) but turn out to be not quite so simple. This issue has improved over the years, with additions of methods like split to java.lang.String, but some gaps remain. And the solution - the joy of an OO langauge - is for you ...
|4393||Splitting Java strings and extracting numbers|
In Java you can use packages in the utility class to handle strings, or you can use methodsin java.lang.String which has been enhanced from version to version and now includes methods such as String.split().
Examples from today's course - taking a line of data (which could have been read from a file) ...
|3048||String handling - from first steps to practical examples|
Initial String handling examples on a training course are sometimes a bit mundane - and that's because we have to cover some of the basics like "what is a string" before we start reading them in useful quantities from files, databases, or web resources. But it's important to get those basics understood ...
|2649||Length, size or capacity in Java?|
You get the length of an array, but you ask about the size() of an ArrayList, and you can inquire into the capacity() of a StringBuffer. Aren't they really all the same sort of thing? Which does Java use in which circumstance?
Java uses the word length when you're asking about something that can be ...
|1557||Trying out our Java examples on our web site|
We've included all of the source code of our training examples on this web site for quite a long time now ... and about a year ago we put working copies of most of the PHP scripts up there too (we have left out those which show security holes).
Now we're in the process of adding some of the Java code ...
|1446||An answer to a student asking 'Help'|
I've got time - a lot of time - to help people who are learning; it's really rewarding to teach the subjects that we do, and the most rewarding students are those who take the time to go above and beyond the norm in asking questions. So why, when I get an email out of the blue asking for help with a ...
Examples from our training material
PicturesA memorable course - 8 students of 6 different nationalities
Some modules are available for download
as a sample of our material or under an Open Training Notes License
for free download from [here]
Topics covered in this module
Creating string objects.
Operations on strings.
Accessing characters within strings.
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule
Well House Consultants specialise in training courses in
. We run
throughout the UK (and beyond for longer courses), and
at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if you live in a different
country or continent to us
We have a technical library of over 700 books on the subjects on which we teach.
These books are available for reference at our training centre.