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
Browse: Home > scanner function(simple input)
0 Comments:
Post a Comment