CharacterDemoFinal

CharacterDemoFinal - / / / / / File:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// File: CharacterDemoFinal.java // Author: Amber Settle // Course: CSC 211 // The final version of the program as modified during the recording / // Use a static import statement to simplify // references to the Character class methods import static java.lang.Character.*; i public class CharacterDemoFinal { public static void main(String[] args) { String strOne = new String("Hello. What is your name?"); S System.out.println("The first String is \"" + strOne + "\""); S System.out.println("The first letter is: " + strOne.charAt(0)); System.out.println("The last symbol is: " + strOne.charAt(strOne.length()-1)); s System.out.println("The first letter is upper case: " + isUpperCase(strOne.charAt(0))); i System.out.println("The first letter is lower case: " + isLowerCase(strOne.charAt(0))); i // Check if the first character in the String is a letter / System.out.println("The first symbol is a letter: " + isLetter(strOne.charAt(0))); i // Check if the last character in the String is a space / System.out.println("The last symbol is a space: " +
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

CharacterDemoFinal - / / / / / File:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online