473,382 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to save user inputed data on a java program

I wrote a simple gambling game using java, and I wish to let the user to save their record(i.e # of rounds played, points gained per round) so after quitting they game, they could keep on playing intead of starting all over again. Then this game could be more addictive. Can any one tell me how to do that?

Also can you tell me how to run a .class file without running Jcreator?
Feb 28 '08 #1
4 3645
nomad
664 Expert 512MB
I wrote a simple gambling game using java, and I wish to let the user to save their record(i.e # of rounds played, points gained per round) so after quitting they game, they could keep on playing intead of starting all over again. Then this game could be more addictive. Can any one tell me how to do that?

Also can you tell me how to run a .class file without running Jcreator?
try looking into the Java Database Connectivity (JDBC)

take a look at this link
http://java.sun.com/docs/books/tutor...ics/index.html

nomad
Feb 28 '08 #2
try looking into the Java Database Connectivity (JDBC)

take a look at this link
http://java.sun.com/docs/books/tutor...ics/index.html

nomad
I will take a look a that, but it looks beyond my current knowledge level.
Feb 28 '08 #3
BigDaddyLH
1,216 Expert 1GB
A much simpler approach would be to write-to and later read-from a file:

http://java.sun.com/docs/books/tutor.../io/index.html

Another approach that is suitable for a small amount of data, like user preferences, is to use java.util.prefs:

http://java.sun.com/j2se/1.4.2/docs/...eferences.html
Feb 28 '08 #4
sukatoa
539 512MB
Also can you tell me how to run a .class file without running Jcreator?
If you mean that having your compiled code in a executable like to run your program by just clicking on it, then you may need this.

I hope it helps,
Sukatoa
Feb 28 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: ^CeFoS^ | last post by:
Hi to everybody, due to I want to use the serial port of a server machine through an applet allocated in html document. > Then one application will run in the server machine and using > the serial...
3
by: Robert Bralic | last post by:
Hello, I writed small graphical editor for probabilystic networks in JAVA, but there was problem with making save file inJAVA. I thinked about it and I concluded that Save in JAVA is great...
4
by: sunilj20 | last post by:
Hello, I have a requirement wherein, a user clicks on a file name in an ASP.NET web application, and the file should automatically be downloaded (Without showing the "Open", "Save As") in the...
8
by: lisaj | last post by:
I'm having huge difficulties producing a script for this: Write a javascript programme that will prompt for, and accept from the user, an input string which contains at least 8 characters. It...
1
by: yodadbl07 | last post by:
hey ive been messing around with this program to take a user inputed number, put it into an array and then reverse the number. I also want it to omit unecessary 0's at the begging. for example if...
1
by: Robert Bralic | last post by:
If I make a applet from Java program is it possible that this applet writes something on disk from browser... I have a application with graphics and I want to make, she as applet but I don't know...
1
by: Orin | last post by:
Hello! I'm using php and have a complicated task, so if someone can understand it then please help me to solve it The task is to make function, that will understand user-inputed regexp and...
2
by: sriniwas | last post by:
Hi Frnd's, m using prefuse visulation,it's have one display class and this class have one saveImage(outPutStream, String jpg,double size);. now graph is converting ia jpg image properly.now my...
1
by: supahsain | last post by:
I got this assignment, and almost have no clue, and my teacher doesn't even teaches us anything This is what i am suppose to do...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.