/* Heres the 3rd code post .In this post i will tell you how to get a input from the user */
/*The below line import java.util.Scanner is used whenever we want to get input from the user , its very interesting */
import java.util.Scanner;
class strawberry {
public static void main (String args[]) {
System.out.println("Enter a String");
// arsi is object which we are using
Scanner arsi = new Scanner (System.in);
System.out.println(arsi.nextLine());
}
}
/*The below line import java.util.Scanner is used whenever we want to get input from the user , its very interesting */
import java.util.Scanner;
class strawberry {
public static void main (String args[]) {
System.out.println("Enter a String");
// arsi is object which we are using
Scanner arsi = new Scanner (System.in);
System.out.println(arsi.nextLine());
}
}
/*In the above program, am telling u , how to get a string , but i promise in the next post i'll tell u how to get int , float , double values , stay tone with my blog , am sure u gonna learn out in the upcoming post :)*/
/* Follow me on :
www.facebook.com/arslan.aliawan
@arslanaliawan2 (twitter)
*/
/* Follow me on :
www.facebook.com/arslan.aliawan
@arslanaliawan2 (twitter)
*/
No comments:
Post a Comment