d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Help With A Small Question > Java Beginner :x
Add Reply New Topic New Poll
Member
Posts: 9,834
Joined: Feb 27 2008
Gold: 157.41
Feb 3 2013 12:43am
I was looking at my schedule for work today and told myself, "I want to make something in java that will tell me how long I work each day to practice." Nothing overly advanced, in fact it may be one of the most simple things you can do, right? Well, I got it to do that. It's just I'm a little confused about certain things.

http://pastebin.com/HAnWnDTP

That's what I wrote. Here's what I'm trying to think of a way to get it to do. I want to just be able to type in Hour:Minute instead of having two or more separate scanner inputs (or whatever you may call them).

I don't need immediate help since this is just me trying to learn little by little, but help would be appreciated. ^_^
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Feb 3 2013 01:14am
read in the entire line as a single string.
split it on :
Member
Posts: 4,980
Joined: Jan 16 2010
Gold: 0.00
Warn: 20%
Feb 3 2013 06:38am
Don't make your entire program in the main method. Indent properly.
Member
Posts: 9,834
Joined: Feb 27 2008
Gold: 157.41
Feb 3 2013 03:25pm
Quote (Grandebedte @ Feb 3 2013 07:38am)
Don't make your entire program in the main method. Indent properly.


What does indenting have to do with anything?.....Isn't that just personal preference?

Quote (carteblanche @ Feb 3 2013 02:14am)
read in the entire line as a single string.
split it on :


Thanks.
Member
Posts: 4,980
Joined: Jan 16 2010
Gold: 0.00
Warn: 20%
Feb 3 2013 03:39pm
Quote (GoGoData @ 3 Feb 2013 23:25)
What does indenting have to do with anything?.....Isn't that just personal preference?



Thanks.


You were asking for help. Those two points define the absolute foundation of any readable code.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll