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

Explain the difference between abstract classes and interfaces in java?

0 Answers  


What is I/O Filter?

2 Answers   TCS, WAX,


How do I know if java is installed?

0 Answers  


explain Anonynous inner class?

6 Answers   TCS,


What is the format specifier?

0 Answers  


What's a method in programming?

0 Answers  


What restrictions are placed on method overloading?

0 Answers  


Can we modify the throws clause of the superclass method while overriding it in the subclass?

0 Answers  


What is meant by object oriented programming – oop?

0 Answers  


Can finally block be used without a catch?

0 Answers  


Explain Linked HashSet

1 Answers  


What is the frontend and backedn in Java?

3 Answers   TCS,


Categories