Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to use scanner in java?

Answer Posted / hrindows@gmail.com

import java.util.Scanner;

class classname{
public methodname(){
//Scanner declaration
Scanner s_name = new Scanner(System.in);
//Use Scanner to take input
int val = s_name.nextInt();
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are peerless components?

1089


How is string stored in java?

1061


What is the purpose of object oriented programming?

980


Can we write method inside a method in java?

994


What are the different types of inheritance in java?

991


Explain the difference between static and dynamic binding in java?

1067


What is the use of bufferedreader?

996


What does the @override annotation do?

1040


What are the two ways in which thread can be created?

1053


Can we have try block without catch block?

1031


What is the difference between multitasking and multithreading in Java

1186


How many static init can you have?

1216


What is a blocking method in Java?

1243


Give me some null interfaces in java?

1057


What is the += operator called?

1063