Tuesday, 2 June 2015

How to Read data from console without IO package in Java?

       

import java.util.*;
class a
{
public static void main(String args[])throws Exception
{Scanner snr= new Scanner(System.in);

String s=snr.nextLine();
char arr[]=s.toCharArray();

System.out.println(arr);





}
}

 

No comments:

Post a Comment