simple program question

Ads
 

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) } }

Ads









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
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
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 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
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
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
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
question
question  please give me a simple program using bean + jsp + mysql
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/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
question
question  i need a simple jsp code for monthly salary calculation
question
question  i need a simple jsp code for monthly salary calculation
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
question
question  i need a simple code to display all employees on leave using jsp and mysql
question
question  i need a simple javascript or jsp code to send message from one mail to another mail
question
question  i need a simple javascript or jsp code to send message from one mail to another mail
question
question  i need a simple jsp + mysql code for trigger after insert
question
question  Sir, Please help me to develop a simple search engine model in java , send me some codes
question
question  Sir, please give me a simple jsp code to upload images to a folder
question
question  good afternoon sir, please send me a simple Jsp or Java code to display a calendar with Indian public holidays,current date and time.It is very urgent,please consider and me as soon as possible
question
question  i need a simple jsp + mysql code to display all absentees.and please send,if have any option to send any notification message to user who forgot to mark attendance
question
question  Dear Sir, could you please send me a simple example of java and database connectivity with java and sql   Please visit the following link: JDBC Tutorials
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

Ads