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?



How to use scanner in java?..

Answer / 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

More Core Java Interview Questions

how we can make a write-only class in java?

0 Answers  


Can we sort list in java?

0 Answers  


What is Servlet?

8 Answers  


What is the nested interface?

0 Answers  


What are autoboxing and unboxing? When does it occur?

0 Answers  


what is the use of finalize()Method please explain with an example

3 Answers  


While opening the file, what type of exceptions can be caught?

3 Answers  


printstream class method println() is calling using System class and its static object out .how it is explain any one in detail with example ?

1 Answers   TCS,


If an object is garbage collected, can it become reachable again?

0 Answers  


I want to run a simple hello world java (HelloWorld.java) program using a batch file. How can i run it and how to construct a batch file.

1 Answers   Infosys,


What is java beans?

0 Answers  


Is binary a low level language?

0 Answers  


Categories