August 2004
Intermediate to advanced
480 pages
9h 41m
English
In keeping with the habit I'm trying to develop, of focusing on code that you can run and change and mess around with, and get you in the habit of doing instead of reading, let's just plunk down some code that shows off some of the useful methods of the java.lang.String class.
package net.javagarage.demo.String; /** <p> * Demonstrates how to use Strings to your advantage. * </p> * @author HewittE * @since 1.2 * @version 1.0 * @see **/ public class StringDemo { private static void print(String s){ System.out.println(s); } private static void print(char c){ System.out.println(c); } private static void print(int i){ System.out.println(i); } private static void print(boolean b){ System.out.println(b); } public ...Read now
Unlock full access