simple program question

simple program question

how do i get a java program to take an input from the user and have it terminate by a period and not by pressing enter?

View Answers

September 3, 2011 at 9:04 PM

How to get the input for java programs

public class name{ public static void main(String args[]){ Scanner fi=new Scanner(system.in); BufferReader bf=new BufferReader(fi); int a=bf.readLine(); system.out.println("Value OF input is"+a) } }









Related Tutorials/Questions & Answers:
simple program question
simple program question  how do i get a java program to take an input from the user and have it terminate by a period and not by pressing enter
simple program
simple program  how to print * like triangle
Advertisements
A Simple program
A Simple program  Hi I have written the following code: class FirstRectangle{ public int rectArea(int l,int b){ int farea = l*b; System.out.println("Required Area::"+farea); return farea
A simple question - Java Beginners
A simple question   Design a program to calculate either the square of a number or the square root of a number and display the results. output should be like:- Enter a float value: 6.2 Do you want the (s)quare or square (r
Simple Question - JDBC
Simple Question  Respected Sir/Madam, I am R.Ragavendran.. Can I know the following syntax is valid or not? while(rs.next()) { <% <TR> } Because its not working for me.. It is throwing
Java program question ...
Java program to draw a triangle of stars given N the number of stars at the bottom line  Write a program to draw a triangle of stars given N the number of stars at the bottom line. can assume that N will always be an odd number
simple calculator program in javascript
simple calculator program in javascript  strong textsimple calculator in javascript
Simple JSP program example
Simple JSP program example  Hi, How to make simple jsp program... with the simple JSP example program. Give me simple jsp program example. Thanks   HI, The very simple JSP program is to display the current date on the JSP
simple webdesign program with coding
simple webdesign program with coding  how to design a webpage using html   Please go through the following link: HTML Tutorials
Simple JSP program
Simple JSP program  create a simple jsp page in which number is to be entered by user in jsp page and submit button clicked.If number entered is greater then 100,then message box "no is greater" elseif less "no is lesser
Java simple question - Java Beginners
Java simple question  I have to design a program for a trucking company that has 7 trucks in its fleet. Each truck is identified by a number, 1-7.... Truck 7 Max = 30K weight = 20K. (8 possible dialog boxes: program instructions
Simple Java Question - Java Beginners
Simple Java Question  [color=#0040BF] Dear All, I have a huge text file with name animal.txt, I have the following sample data: >id1 lion >id2 horse cat >id3 mouse tiger I need to save the contents
program code for this question - Java Beginners
program code for this question  QUESTION 2: Address Information... as an IP lookup tool. The program reads a search phrase (which could either be an IP... file. The program should display the IP address together with all the associated
program code for this question - Java Beginners
program code for this question  QUESTION 1: Electricity Bill Tshubang Energy Pty (Ltd) is a company that supplies electricity to its customers.... Program should send each customer?s bill to a text file whose name is the customers?s
C Program Question - Development process
C Program Question  How i can calulate sum of First digit and last digit of Five Numbers. e.g 12345 i want to calculate 1+5=6 how i can calculate in C Program?   Hi Friend, Try the following code
please give me an idea to develop a program for this question?
please give me an idea to develop a program for this question?  How to enter a text or number from keyboard without using InputStreamReader method in java
JSF Simple question - Java Server Faces Questions
JSF Simple question  I have h:dataTable (with 10 position) i need write simple jsf file that represent only 5 position and on another page last 5 position . How can i proceed from first page to second
please give me a java program for the following question
please give me a java program for the following question  Write a java program that displays multiple frames : Step 1: Design a frame with three buttons: ?Fruit?, ?Bird? and ?Animal? Step 2: On clicking ?Fruit? button
Hibernate Simple Program Using Java Application with Eclipse
Hibernate Simple Program Using Java Application with Eclipse  How to write Hibernate Simple Program Using Java Application with Eclipse? I wish to learn Hibernate using very popular Eclipse IDE. Share me the best tutorial link
Help me to write this simple java frame program
Help me to write this simple java frame program   I want to write a Java program for.... To create a frame with 4 text fields;name,street,city and pin;with suitable labels. Also add a button "OK". After enter values
Simple Program Very Urgent.. - JSP-Servlet
Simple Program Very Urgent..  Respected Sir/Madam, I am R.Ragavendran.. Thanks for your superb reply. I find a simple problem which i have tried my level best to solve.In the output, the text box is receiving some other value
Simple Java class program - Java Beginners
Simple Java class program  Hi sir, Please help me Write a simple class that iterates through all the arguments passed in on the command line and prints them out to the screen. If no arguments are specified print a message
Simple Java class program - Java Beginners
Simple Java class program  Hello, Please help me, Write a simple class that iterates through all the arguments passed in on the command line and prints them out to the screen. If no arguments are specified print a message
question
question   sir plz tell me what should i give in title box. just i want java program for the question typed in this area
question
question   sir plz tell me what should i give in title box. just i want java program for the question typed in this area
Question
Question   When there is an exception in my program how java runtime system handles
java program.. the question is scary ...please help - Java Beginners
java program.. the question is scary ...please help  Modify the Lexer..., etc. 4. Print each token with line number READLINE: program { int i int j program left: 0 right: 6 line: 1 { left: 8 right: 8: line: 1 int
Very simple `Hello world' java program that prints HelloWorld
Hello World Java Simple Java Program for beginners... to develop robust applications. Writing a simple Hello World program is stepwise... Program: How to save  To run this program, save it in a file
question
question  dear sir/madam my question is how to compare two text format in java..we are java beginners..so we need the complete source code for above mentioned question...we have to compare each and every word
session realtime usage program simple jsp program or servlet ,which understands me importance of session
session realtime usage program simple jsp program or servlet ,which understands... like client state storage scope.,but jsp or servlet realtime simple session related program whether it may be loginpage or anything must simple understanding
question
question  Dear sir i had some typing mistake at previous question so its my humble request to let me know the steps to start the tomcat6 under the tomcat directory
Class Average Program
Class Average Program       This is a simple program of Java class. In this tutorial we will learn how to use java program for displaying average value. The java instances
Question?
Question?  My question is how to: Add a menu bar to the program with a File menu. In the File menu, add a submenu (JMenuItem) called About. When the user clicks on the About menu item, display a JOptionPane message dialog
question
question  please give me a simple program using bean + jsp + mysql
Simple program to combine all html,ajax,java,servlets,jsp,json - Java Beginners
Simple program to combine all html,ajax,java,servlets,jsp,json  Hi... a program which is a combination of all those technology. For that, i planned to design a simple html page with a input field and submit button. I tried to do
Simple java program
Simple java program Hi this is the thing we got to do and i am totally confused on how to write this program it would be a great help i could be helped... that program. plz do help me out here. Part I Write a program
question
question  Gud morning sir, I have asked u some question regarding jsp in saturaday for that i didnot find any answere in which u send me the some of the links.U have asked me the specify some details. There is a entity name
question
question  i need a jsp program to get system ip address
question
question  i need a jsp and mysql program to display all employees on leave
question
question  i need a jsp program to list all employees on leave +mysql
question
question  how to run a jsp program while ubundu(linux) boot up
Question
Question  Sir, give me a java program to count the number of tokens , given a string and a seperator
question
question  i need a jsp and mysql program to retrieve data from employee table and attendance table using user name and password at a time
Question
Question  Sir, give me a Java program to read data from keyboard up to names , sort in alphabetical order using bubble sort
question
question  i need a jsp/html program which includes drop down menu for leave types and a button for apply leave.and need another jsp to validate types of leave and then insert in to data base using mysql
question
question  i need a jsp and mysql program to retrieve data from employee table and attendance table using user name and password at a time for a Sign in user
Question
Question  Sir, please help me to write a JAVA program to read data from keyboard up to names and sort in alphabetical order using bubble sort
question
question  Sir, could you please help me to write a php program to display the contents of html registration form in a php page but i need to verify the phone number is number or not and also verify the email is valid
Question
program style java interview questions and answers  Good afternoon sir could you please send me program style java interview questions and answers for one year experianced candidates.ie ,the questions like find out the result
question
question  good afternoon sir, i need a jsp/html program which includes drop down menu for leave types and a button for apply leave.and need another jsp to insert types of leave which is selected by the user ,in to data base

Ads