Hey Guys really need to learn

Hey Guys really need to learn

View Answers

July 15, 2009 at 10:42 AM

Hi Friend,

There are lot of ways to input data.You can use the methods of BufferedReader class, Scanner class, StreamTokenizer class to input the data from the command prompt.

Try the following code to input three integers from the command prompt.

import java.util.*;

public class UserInput{
public static void main(String[]args){
System.out.println("Enter three numbers:");
Scanner input=new Scanner(System.in);
int num1=input.nextInt();
int num2=input.nextInt();
int num3=input.nextInt();
System.out.println("You have entered numbers: "+num1+","+num2+","+num3);

}
}

Thanks









Related Tutorials/Questions & Answers:
Hey Guys really need to learn - Java Beginners
Hey Guys really need to learn  Im a java beginner and i want to know how can i input 3 value.. Wath i mean is in C, to you to be able to input number u will use scanf(%d%d%d, & month, day, year). How can i do this in java
guys,, need help,, in java programing,, arrays
guys,, need help,, in java programing,, arrays  create a program where you will input 10 numbers and arrange it in ascending way using arrays
Advertisements
Hey guys, I'm new to this forum..select onclick show all fieds in textarea in line by line(name,address,state,country,mobile)
Hey guys, I'm new to this forum..select onclick show all fieds in textarea in line by line(name,address,state,country,mobile)  <script type = "text/javascript"> function get_val() { var option
I really need a tutor for Java program that has to do with multithreading and gui!
I really need a tutor for Java program that has to do with multithreading and gui!  I am looking for a Tutor to help me with a Java program, specially GUI and multithreading. If you can tutor, please email me
really need help on how to write this program plz some 1 help out. - Java Beginners
really need help on how to write this program plz some 1 help out.  i am confused here on what to write can some 1 help out here i dont quite understand how to code it so can some 1 help out. Part II Write, compile and execute
I really need help with this assignment question Please help me out Please
I really need help with this assignment question Please help me out Please  * Description* You are hired to develop a laptop inventory information... in MySQL. For this purpose you will need to use the sheridancollege database we
What you Really Need to know about Fashion
What you Really Need to know about Fashion You might think... know about fashion, even if you are not really interested in following... on. Of course, we say this again, there is no need for you to follow these trends if you
Social Media Marketing: Do you really need it?
Social Media Marketing: Do you really need it? Social Media Marketing might... for nothing is not really a good idea. The first thing that you need to consider... and you will have trouble turning a profit. In this case you don't really need
ModuleNotFoundError: No module named 'Hey'
ModuleNotFoundError: No module named 'Hey'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'Hey' How to remove the ModuleNotFoundError: No module named 'Hey' error
Is Alexa really AI?
Is Alexa really AI?  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: Is Alexa really AI? Try to provide me good examples or tutorials links so that I can learn
Is data science really in demand?
so that I can learn the topic "Is data science really in demand?"...Is data science really in demand?  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn
ModuleNotFoundError: No module named 'hey_april'
ModuleNotFoundError: No module named 'hey_april'  Hi, My Python... 'hey_april' How to remove the ModuleNotFoundError: No module named 'hey... have to install padas library. You can install hey_april python with following
ModuleNotFoundError: No module named 'hey_dl'
ModuleNotFoundError: No module named 'hey_dl'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'hey_dl' How to remove the ModuleNotFoundError: No module named 'hey_dl'
ModuleNotFoundError: No module named 'hey_pgsqlexec'
ModuleNotFoundError: No module named 'hey_pgsqlexec'  Hi, My... 'hey_pgsqlexec' How to remove the ModuleNotFoundError: No module named 'hey_pgsqlexec' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'hey_rexec'
ModuleNotFoundError: No module named 'hey_rexec'  Hi, My Python... 'hey_rexec' How to remove the ModuleNotFoundError: No module named 'hey... have to install padas library. You can install hey_rexec python with following
ModuleNotFoundError: No module named 'Really'
ModuleNotFoundError: No module named 'Really'  Hi, My Python... 'Really' How to remove the ModuleNotFoundError: No module named 'Really'... to install padas library. You can install Really python with following command
need
need  i need a jsp coding based project plz help me
I really hate my data scientist job
links so that I can learn the topic "I really hate my data scientist...I really hate my data scientist job  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: I
Is the data science job market really dead?
to learn: Is the data science job market really dead? Try to provide me good examples or tutorials links so that I can learn the topic "Is the data science...Is the data science job market really dead?  Hi, I am beginner
OptionPane.GetInputDialog. Is it really Modal?
OptionPane.GetInputDialog. Is it really Modal?  I have a button (ReCalc) which loads a dialog with a textbox. If I use the mouse to click 'ReCalc" and to click the 'OK' in the dialog then all is ok. If I put the focus on 'ReCalc
I really hate my data scientist job. What's your experience?
for the tutorials to learn: I really hate my data scientist job. What's your experience? Try to provide me good examples or tutorials links so that I can learn...I really hate my data scientist job. What's your experience?  Hi, I
Really Simple History (RSH)
Really Simple History (RSH)       The Really Simple History (RSH) framework makes it easy for AJAX applications to incorporate bookmarking and back and button support. By default, AJAX
ModuleNotFoundError: No module named 'mandrill-really-maintained'
ModuleNotFoundError: No module named 'mandrill-really-maintained'  Hi...: No module named 'mandrill-really-maintained' How to remove the ModuleNotFoundError: No module named 'mandrill-really-maintained' error? Thanks
ModuleNotFoundError: No module named 'really-cool-script'
ModuleNotFoundError: No module named 'really-cool-script'  Hi, My... named 'really-cool-script' How to remove the ModuleNotFoundError: No module named 'really-cool-script' error? Thanks   Hi, In your
Hey neighbor, can you lend some Hammers?
Hey neighbor, can you lend some Hammers?  import java.util.Date; public class AccountProblem { public static void main(String[] args) { //create an instance object of class Stock Account myAccount = new Account
Hey neighbor, can you lend some Hammers?
Hey neighbor, can you lend some Hammers?  import java.util.Date; public class AccountProblem { public static void main(String[] args) { //create an instance object of class Stock Account myAccount = new Account
hello there i need help
i am a beginner, and aside from that i am really eager to learn java please help...hello there i need help  : i need to do a program like this: Automatic Teller Machine [B] Balance [D] Deposit [W] Withdrawal [Q] Quit select you
Hey - Java Beginners
Need of JUnit
Need of JUnit  Hi sir, What makes JUnit better than other... pros & cons of technology, you are going to learn. So here are some key.... There's no need to manually comb through a report of test results.ADS_TO_REPLACE_2 4
Need of ORM
Need of ORM  Why do you need ORM tools like hibernate
need of code
need of code  howto convert greyscale image to binary image in java
need coding
need coding  sir i need code for simple bank application in jsp please send it   sir i need the coding for simple bank application in jsp.   Please visit the following link: Jsp Bank Application
Need Suggistion
Need Suggistion  how to call a callable statement in our jSp page using Struts environment
urgent need
urgent need   Input a line. Count the number of words that start with a capital letter
Need Project
Need Project  How to develop School management project by using Struts Framework? Please give me suggestion and sample examples for my project
need to Program
need to Program   Can any one help me on below How to insert more then one records in EXCEL Sheet using JSP
need query
need query  hi sir , i am beginner to sql.i need a query so that it can be helpful to my project. i have four tables each containing different fruits with different amounts. i need a query in such a way that when i say some
need
need
need project
need project  hi im new on this site so dnt knw actual procedure . but i need a project on banking system in java with sql database. which should... is good plz add it i need project till Saturday i.e 10th march 2012 plzzzz
need answer
need answer  Given a phone number, as a string, generate the lettercombinations that are possible based on the telephone keypad's number/letter relationship (ie, 1 is related to no letters, 2 is related to 'a' 'b' 'c', 3
Need help
Need help  Hello... I need some help I have a method which contains 1 string value and i wnat when this method get called den that string value should b assigned as array name.. for example.. i have a method name() which
Need help
Need help  Hello... I need some help I have a method which contains 1 string value and i wnat when this method get called den that string value should b assigned as array name.. for example.. i have a method name() which
Need help
Need help  Dear sir, I have a problem. How to write JSP coding, if a user select a value from drop down list for example department, the another drop down list should show the list of name in the department that chosen before
NEED A PROG
NEED A PROG   whats the program to add,delete, display elements of an object using collecions. without using linked list   Hi Friend, Try the following code: import java.util.*; class CollectionExample { public
need code
need code  Create Vehicle having following attributes: Vehicle No., Model, Manufacturer and Color. Create truck which has the following additional attributes:loading capacity( 100 tons?).Add a behavior to change the color
need code
need code  Create Vehicle having following attributes: Vehicle No., Model, Manufacturer and Color. Create truck which has the following additional attributes:loading capacity( 100 tons?).Add a behavior to change the color
need code
need code  Create Vehicle having following attributes: Vehicle No., Model, Manufacturer and Color. Create truck which has the following additional attributes:loading capacity( 100 tons?).Add a behavior to change the color
Need help with this!
Need help with this!  Can anyone please help me with this? It's suppose to write to a file student information: student name, student Id, test scores... to effectivly end the loop with out the need to break it. for(i=(0); i <
I need Spring 2.5 example.
I need Spring 2.5 example.  Hello, I am looking forward to learn Spring framework and hence I need Spring 2.5 and Spring 3.0 example.. Thanks

Ads