Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Hey Guys really need to learn
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Hazel
Hey Guys really need to learn
1 Answer(s)      5 years and 6 months ago
Posted in : Java Beginners



Advertisement
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
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
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
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
learn
learn  i need info about where i type the java's applet and awt programs,and how to compile and run them.please give me answer
need
need  i need a jsp coding based project plz help me
Learn Java
There is a need to learn Java programming in today?s world as it has become..., there is need of Java, Hence it become more important for a programmer to learn... and server. If you are in need to learn Java quickly then the best way to achieve
Learn Java in 21 days
Anyone can learn Java in 21 days, all they need is dedication and concentration. Java Guide at RoseIndia can help you learn Java in 21 days. The course... of the simplest object oriented language, where a programmer does not need to code
servlet not working properly ...pls help me out....its really urgent
servlet not working properly ...pls help me out....its really urgent  Hi, Below is the front page of my project 1)enty.jsp </form> </body> </html> </form> </body> </html>> <
Guys Help me with this Application(when you put the name of the website it will return the IP of the web)
Guys Help me with this Application(when you put the name of the website it will return the IP of the web)  import java.awt.*; import java.awt.event.*; import java.net.*; import java.io.*; public class MyApp extends
Guys Help me with this Application(when you put the name of the website it will return the IP of the web)
Guys Help me with this Application(when you put the name of the website it will return the IP of the web)  import java.awt.*; import java.awt.event.*; import java.net.*; import java.io.*; public class MyApp extends
Learn Management
Learn Management  Hi, How to learn Management online? Thanks   Hi, You can learn management at Management tutorials section. Thanks
learn jquery
learn jquery   is it possible to learn myself jquery,ajax and json   Yes, you can learn these technologies by yourself. Go through the following links: Ajax Tutorials JSON Tutorials JQuery Tutorials
learn jquery
learn jquery   is it possible to learn myself jquery,ajax and json   Yes, you can learn these technologies by yourself. Go through the following links: Ajax Tutorials JSON Tutorials JQuery Tutorials
Learn spring
Learn spring  How a beginner can learn spring?   Learning spring is little difficult task. There are many modules of the spring framework. But you can start learning the spring core and gradually learn the other
to learn java
to learn java  I am b.com graduate. Can l able to learn java platform without knowing any basics software language.   Learn Java from the following link: Java Tutorials Here you will get several java tutorials
Learn Ajax
Learn Ajax  Hi, Give good links to learn ajax. What is the correct url at roseindia.net to learn Ajax? Thanks   Hi, If you are beginner in Ajax start learning from the index of Ajax tutorial. Start learning Ajax
Learn java
Learn java  Hi, I am absolute beginner in Java programming Language. Can anyone tell me how I can learn: a) Basics of Java b) Advance Java c) Java frameworks and anything which is important. Thanks
learn CVS
learn CVS  How i can use cvs in eclipse, How i can check in and cheack out my project
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
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... and they check their own results and provide immediate feedback. There's no need
 

 

 

DMCA.com