SHARING KNOWLEDGE EACH OTHERS!

Wednesday, December 31, 2008

scanner function(simple input)


import java.util.Scanner;

public class input
{
//-----------------------------------------------------------------
// using scanner to give input
//-----------------------------------------------------------------
public static void main (String[] args)
{
String input;
Scanner scan = new Scanner (System.in);

System.out.println ("Give your input:");

input = scan.nextLine();

System.out.println ("Ur input is: \"" + input + "\" ");
}
}
GO TO CHAPTER 3

Stumble
Delicious
Technorati
Twitter
Facebook

0 Comments:

Post a Comment

Enter your email address:

 

SOFTWARES AND PLATFORMS Copyright © 2010 LKart Theme is Designed by Lasantha