intermediate/ScannerExplore

From ggc

Jump to: navigation, search

01 package intermediate;
02 //start auto-imports
03 import java.lang.*;
04 import java.util.*;
05 //end auto-imports
06 
07 
08 /**
09  * All about my application.
10  @author Jam Jenkins
11  */
12 public class ScannerExplore
13 {
14   public static void main(String[] args)
15   {
16     String source=
17         "Happy days\n"+
18         "are here to stay.";
19     Scanner scanner=new Scanner(source);
20     System.out.println("Source is \n"+source);
21     String firstLine=scanner.nextLine();
22     String secondLine=scanner.nextLine();
23     char letter=scanner.next().charAt(0);
24     System.out.println("first line is \n"+firstLine);
25     System.out.println("letter is "+letter);
26   }
27 }


Download/View intermediate/ScannerExplore.java





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter