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

What is java util concurrentmodificationexception?

0 Answers  


What is the requirement of thread in java?

0 Answers  


What is java thread dump, how can we get java thread dump of a program?

0 Answers  


What is constructor and virtual function? Can we call a virtual function in a constructor?

0 Answers  


What is a final class in java?

0 Answers  


Is null function in java?

0 Answers  


Can java run on google chrome?

0 Answers  


What is console based application in java?

0 Answers  


Difference between Primary key and unique key?

4 Answers  


What are the loops in java?

0 Answers  


What is the superclass of exception?

3 Answers  


What is files manifesting?

0 Answers  


Categories