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 happens when a thread cannot acquire a lock on an object? : Java thread

0 Answers  


What is clipping and repainting and what is the relation between them?

1 Answers  


What is java command?

0 Answers  


What is a module function?

0 Answers  


What is method and methodology?

0 Answers  


Can we have a method name same as class name in java?

0 Answers  


What is a function easy definition?

0 Answers  


What is the properties class?

0 Answers  


What is method reference?

0 Answers  


What is the difference between exception and error in java?

0 Answers  


What is module in oop?

0 Answers  


What is the difference between the paint() and repaint() methods in java programming?

0 Answers  


Categories