java date - testmy.net resource / tool
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
Home
Download Test
Test Your Download Speed
Test Download AND Upload
Upload Test
Test Your Upload Speed
Test Upload AND Download
Community Forum
Community Forum Home
» Log-In
» Register
Internal Search
Google Powered Search
Computer & Net Guides
ISP Discussion
Forum Sitemap
Member List
Forum Stats
Forum Help and Info
Calendar & Birthdays
Database Stats
Host Stats
Member Stats
Share Score
Misc Tools
Conversion Calc.
Speed Chart
Conversion Table
Create a Test
Share Score
Automatic Test
Forum Archive
RSS and Blog Feeds
Score Database
trace/ping/whois/DNS
Wallpapers
Tweak Guide
!! Forum Search !!
!! Google Search !!
TMN Detailed Sitemap
News
News Home
Join
Theme
See Theme List
America the Beautiful
Blacken
Dark Blood Red
Blue
Blue Black Box
Blue Gray
Brown
Christmas
Dark Blue
ekaf
GL Series (default)
Gray Shades
Original Feel
Green
Greenhouse
Greenhouse Gray
Halloween Theme
Orange
Purple Darkness
Red/pink
Red 'n Black
TurkeyDay!
» Neuron (Default)
Neuron Black
Rise (New!)
Click to read why...
News
:
remember, testmy.net loves you! Show your love back and tell your friends about our great community! We rely 100% on word of mouth advertising, so if you find that the site is useful, tell a friend! ~ Thanks!
September 06, 2008, 04:20:18 PM
testmy.net Broadband
|
Main Forum
|
HELP!
|
Programming and Website Help
| Topic:
java date
0 Members and 1 Guest are viewing this topic.
« previous
next »
Topic Tools
Search this topic
Pages
1
Author
Topic: java date (Read 934 times)
jamaicarocks
TMN Friend
Offline
Posts: 297
There's no place like 127.0.0.1 .
java date
«
on:
October 06, 2007, 09:51:41 PM »
good day,
I am designing a program in Java and want users to enter their birth month, entering a number between 1-12, which represents Jan to Dec ..........then prints out the Month which corresponds to the number they entered.
The problem I'm having is Java's month starts at January corresponding to number 0.
How could I change this, or see instructions to change this.
Thank you
Logged
fr0stbound
Expert
Offline
Posts: 1292
Re: java date
«
Reply #1 on:
October 07, 2007, 01:50:48 AM »
to put it crudely, store the user input in a variable. subtract 1 from the value, then use the result to process output.
therefore, if user inputs 1, store to variable a, then subtract 1. that will make it as though the user input(inputted? i don't know the past tense) 0. and so on for other numbers.
sorry if it was hard to understand, i don't know how to program with java(yet). do you know c? if you want, i'll give you a sample source code.
also, a tip, since this is the hardest to do at beginner level programming. make sure you make an error catching sort of module, in case the user inputs a wrong value. in your case, it will be inputting a month higher than 12. my teacher taught me this the hard way. a simple nested if-then statement will do the job.
Logged
Quote from: Jimi Hendrix
When the power of love overcomes the love of power, the world will know peace.
If uppercase letters don't exist, what will you think if you see someone says "I helped my Uncle Jack off a horse"
jamaicarocks
TMN Friend
Offline
Posts: 297
There's no place like 127.0.0.1 .
Re: java date
«
Reply #2 on:
October 07, 2007, 02:44:29 AM »
Thanks alot,will try your suggestion, a sample code would have helped a lot.I will use whats known as a Toolbox in Java to kinda restrict what the users can enter.
thanks so far
Logged
Pages
1
testmy.net Broadband
|
Main Forum
|
HELP!
|
Programming and Website Help
| Topic:
java date
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Main Forum
-----------------------------
=> General Discussion
=> New Members
=> PC Security
===> Antivirus & Firewalls
===> Spyware & Malware
===> Viruses & Scams
===> Security Threats
=> Show off your scores!
=> Make it Faster...
=> HELP!
===> HELP! With Other Stuff
===> HELP! With Tests
===> HELP! With Forum
===> Programming and Website Help
=====> HTML
=====> PHP
=====> PERL
=====> Server Help
===> Networking and Hardware
===> Overclocking
===> Linux Help
=> News
===> testmy.net News and Updates
=> Online Gaming Discussion
===> Requests
===> America's Army
===> Battlefield
===> Call Of Duty 4
===> Counter-Strike 1.6
===> Counter-Strike : Source
===> Day of Defeat : Source
===> Diablo
===> F.E.A.R
===> Ghost Recon
===> Halo 2
===> Lineage 2
===> Quake
===> Rainbow Six 3
===> World of Warcraft
===> Tribes 2
===> Unreal Tournament
=> Graphics, Sigs and Pictures
===> Test Board
=> Guides
=> Got any ideas to make testmy.net better?
=> Off Topic Discussion
-----------------------------
Provider Discussion and Reviews
-----------------------------
=> Add a Provider
=> All Dial-up
=> North American Providers (Including Canada)
===> Canadian Providers
=====> teksavvy.com Canada
=====> xplornet.com Canada
=====> Persona Internet
=====> Rogers Communications
=====> Shaw Communications
=====> Sympatico (Bell Canada)
===> Adelphia Communications
===> ALLTEL Communications
===> AOL
===> AT&T
=====> SBC Global
=====> BellSouth
===> Cable One
===> Cavalier Telephone cavtel.net
===> cebridge.net
===> CenturyTel
===> Charter Communications
===> Clearwire
===> Comcast Cable Communications
===> Country Cablevision
===> Covad communications
===> Cox Communications
===> DMAX Puerto Rico
===> EarthLink
===> EMBARQ
===> Frontier Online
===> HughesNet (DIRECWAY)
=====> DW4000 Information
=====> DW6000 Information
=====> DW7000 Information
===> Insight Broadband
===> Mediacom Communications
===> Midcontinent Communications
===> mycingular.net
===> Namesco/NDO (ndo.com)
===> onelinkpr.net Puerto Rico
===> Optimum Online
===> Qwest Communications
===> RCN
===> RoadRunner (Time Warner Cable)
===> seidata.com
===> sigecom.net
===> SkyWay USA
===> Speakeasy
===> Sprint Nextel Corporation
===> Starband
===> Suddenlink
===> SureWest Communications
=====> SureWest Communications FIOS
===> SusCom - Susquehanna Communications
===> TDS - Telephone and Data Systems, Inc
===> Transedge.com
===> Verizon Online
===> Verizon Online FIOS
===> Wave Broadband
===> Wide Open West
===> Wildblue Communications, Inc
=> World Providers (Non-North American)
===> African Providers
===> Asian and Middle Eastern Providers
=====> Asian Providers
=====> Centennial
=====> Digitel
=====> PLDT myDSL
=====> Sify Broadband
=====> Streamyx
=====> Smart Bro (Wi-fi)
===> Australian Providers
=====> Digiplus
=====> Optusnet
=====> Telstra Bigpond
===> UK and European Providers
=====> Bredbandsbolaget
=======> Bredbandsbolaget Fiber
=======> Bredbandsbolaget ADSL, VDSL
=====> Virgin.net (old NTL)
=====> Tiscali
===> Central/South American Providers
-----------------------------
Miscellaneous
-----------------------------
=> Archives
===> Announcements
=> Public Polls
===> Not on index
Print
Advanced search
Loading...
testmy.net's forum is proudly
Powered by SMF
|
SMF © 2006-2007, Simple Machines LLC
© 1999-2008 testmy.net -
Contact
-
Legal
-
Facts & FAQs
Page Loading Stats: This forum Page created in 0.087 seconds with 30 queries.