pname - System.out.println"The Character at 1\t"...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.Scanner; import java.lang.*; import java.io.*; import java.text.*; import java.math.*; import java.text.DecimalFormat; import java.lang.String; i public class pname p { static String sentence; static String str1; static int index, num; public static void main(String[] args) { sentence = "Jeremy"; Scanner Console = new Scanner(System.in); System.out.println("****************************"); System.out.println("The Character at 0:\t" + sentence.charAt(0));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println("The Character at 1:\t" + sentence.charAt(1)); System.out.println("The Character at 2:\t" + sentence.charAt(2)); System.out.println("The Character at 3:\t" + sentence.charAt(3)); System.out.println("The Character at 4:\t" + sentence.charAt(4)); System.out.println("The Character at 5:\t" + sentence.charAt(5)); str1 = Console.next(); System.out.println("Have a nice day"); } }...
View Full Document

This note was uploaded on 06/17/2011 for the course COMP 2302 taught by Professor Staff during the Spring '11 term at Kennesaw.

Ask a homework question - tutors are online