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 close method? How it's different from Finalize & Dispose?

0 Answers   InfoAxon Technologies,


What methods are used in Servlet?Applet communication?

0 Answers   Satyam,


Which sorting algorithm is in place?

0 Answers  


what modifiers are used with top-level class?

2 Answers  


Is java ee a framework?

0 Answers  


How java is platform independent?

41 Answers   College School Exams Tests, Infosys, TCS,


What is the difference between char and char *?

0 Answers  


What does this mean java?

0 Answers  


What is final?

0 Answers  


What is the difference between stream and buffer?

0 Answers  


There are 100 keys and values in HashMap.how to get the keys and values?

1 Answers   IBS,


What is the difference between interpreter and compiling ?

7 Answers   TCS,


Categories