I hope my programs help you a bit.
.............(Pradeep)
Thursday, October 30, 2014
Java program to take input from Keyboard with Scanner class
import java.util.Scanner;
public class KeyboardInput
{
public static void main(String[] args) {Scanner s = new Scanner(System.in); System.out.print( "Enter your name: " ); String name = s.nextLine(); System.out.println( "Hello " + name + "!" ); }
}
No comments:
Post a Comment