O'Reilly logo

Sams Teach Yourself Java™ in 24 Hours, Sixth Edition by Rogers Cadenhead

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Presenting Credits

In The Piano, Ada McGrath Stewart was thrown into unfamiliar territory when she moved from Scotland to New Zealand to marry a stranger who didn’t appreciate her music. You might have felt lost yourself with some of the topics introduced during this hour.

Next, to reinforce the string-handling features that have been covered, you write a Java program to display credits for a feature film. You can probably guess the movie.

Return to the Java24 project in NetBeans and create a new Java class called Credits. Enter the text of Listing 6.1 into the source editor and save the file when you’re done.

Listing 6.1. The Credits Program

 1: class Credits { 2:     public static void main(String[] args) { 3:         // set up film information ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required