473,671 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

basic java help

hello! I'm fairly new to java and we're still doing text-based java stuff at
school. I just need a bit of help for a project. I know how to read input
from the keyboard (e.g. entering a person's name). However, how do I
implement something like "Press ENTER to continue" or "Hit any key to
continue"? I've been looking at the Java API documentation but I really
don't know what I'm looking for. Thank you!

pras
Jul 17 '05 #1
2 4476
I'm new at Java too, but I think asking for a dummy would help...

Instead of saying: "Enter name: ", you can say: "Press enter to continue"
and use String dummy instead of String name...

Hope this helps,
Oswald
"ochulus" <en************ ***@yahoo.com> wrote in message
news:gU******** ************@ne ws-server.bigpond. net.au...
hello! I'm fairly new to java and we're still doing text-based java stuff at school. I just need a bit of help for a project. I know how to read input
from the keyboard (e.g. entering a person's name). However, how do I
implement something like "Press ENTER to continue" or "Hit any key to
continue"? I've been looking at the Java API documentation but I really
don't know what I'm looking for. Thank you!

pras

Jul 17 '05 #2
Greetings Oswald,

I am by no means an expert but here is what i would generally do.

your input method causes the program to pause waiting for input, so if you
just read in a string and throw it away( i dunno how you are reading in
lines, if you could post that i would give you an exact example ). so
soemthing like

System.out.prin tln("Press [Enter] to continue");
String fake_string = [read_in_method]();
{rest of your program}

that should pause your program until someone hits enter

Hope that helped,
Nick
"Oswald" <fl*********@ho tmail.com> wrote in message
news:3f******** *************** @reader1.news.s kynet.be...
I'm new at Java too, but I think asking for a dummy would help...

Instead of saying: "Enter name: ", you can say: "Press enter to continue"
and use String dummy instead of String name...

Hope this helps,
Oswald
"ochulus" <en************ ***@yahoo.com> wrote in message
news:gU******** ************@ne ws-server.bigpond. net.au...
hello! I'm fairly new to java and we're still doing text-based java stuff
at
school. I just need a bit of help for a project. I know how to read

input from the keyboard (e.g. entering a person's name). However, how do I
implement something like "Press ENTER to continue" or "Hit any key to
continue"? I've been looking at the Java API documentation but I really
don't know what I'm looking for. Thank you!

pras




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
7778
by: David Morris | last post by:
OK, this is for you experienced Java programmers out there. I have a string that contains the following value: "myValue += 5" I need, in Java, to be able to evaluate this expression. Caviots: myValue can be int, float, long, double, or short.
2
3489
by: Mark R Rivet | last post by:
I've installed JDK1.1.5 on my windows 2000 professional system and when I give it the command ( in a command prompt window) to compile, it does, but when I try to run the program I get this message: --------------------------------------------------------------------------------------- C:\java4cpp\basic>java java4cpp.basic.FirstProgram Can't find class java4cpp/basic/FirstProgram...
5
5711
by: Lee David | last post by:
I went to the sun site and downloaded what I hope is the development part of java. I downloaded JDK5 with Netbeans. I installed it and now have a folder in my program group "Netbeans". Is that java? Would I execute that to create a java application? TIA, Lee
13
15550
by: Pete | last post by:
I'm cross posting from mscom.webservices.general as I have received no answer there: There has been a number of recent posts requesting how to satisfactorily enable BASIC authorization at the HTTP level but as yet no fully useful answer. I too have been trying to call an apache/axis webservice which desires a username/password from my C# Client. (ie the equivalent of _call.setUsername("Myname") name from within a Java client proxy)...
13
3024
by: usenet | last post by:
How and where can one find out about the basics of VB/Access2003 syntax? I am a died in the wool C/C++/Java Linux/Unix programmer and I am finding it difficult to understand the program format for accessing objects, controls, etc. in VB/Access2003. In particular where will I find explanations of:- Actions, Functions, Methods, Properties - I'm understand the
28
2447
by: grappletech | last post by:
I took Pascal and BASIC in a couple of beginner programming courses about a decade ago and did well with them. I am good with pseudocode, algorithms, and the mathematics of programming. I decided I should perhaps learn a more powerful language to program my own apps. I got a "Beginning C" book, but the C programs won't compile in the free compilers I have downloaded. The syntax is different. I guess I have to buy a programming package,...
6
1376
by: John Bailo | last post by:
http://www.informationweek.com/software/showArticle.jhtml?articleID=196600515 Developers Embrace Java, Drop Visual Basic "Developers have abandoned Microsoft's Visual Basic in droves during the last six months, and they're using Java more than any other development language, according to a recently published survey."
6
3142
by: Simon Walsh | last post by:
I'm an Electronics student in college and I'm currently working on a project. I was given a circuit diagram for my project, from which I had to design a printed circuit board to be sent off and manufactured. I got my printed circuit board back and populated it with components. On my circuit board, I have a chip holder for a Basic STAMP microcontroller. To those unfamiliar with it, the Basic STAMP is a microcontroller which has an onboard...
43
2380
by: Bill H | last post by:
25 years ago every computer came with some form of Basic interpreter so you could use yoru computer without having to buy more software. Is Javascript (teamed with HTML) set to become the new Basic, where anyone with a computer can start writing code without having to purchase any expensive languages? Bill H
14
1842
by: MartinRinehart | last post by:
Working on parser for my language, I see that all classes (Token, Production, Statement, ...) have one thing in common. They all maintain start and stop positions in the source text. So it seems logical to have them all inherit from a base class that defines those, but this doesn't work: import tok class code: def __init__( self, start, stop ):
0
8474
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8392
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8597
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4403
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2809
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2049
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1807
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.